Skip to content

Commit

Permalink
minor fix for runoff hydrograph
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec committed Nov 27, 2021
1 parent 0b2f029 commit fc0d41a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/watershed/reosrunoffhydrographwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,21 @@ void ReosRunoffHydrographWidget::setCurrentWatershed( ReosWatershed *watershed )
mWatershedRunoffModelsModel->setWatershedRunoffModels( nullptr );
mCurrentTransferFunction = nullptr;
syncTransferFunction( nullptr );
mRunoffResultTabModel->clearSerie();
mHydrographResultModel->clearSerie();

}
else
{
mRunoffHydrographStore->setWatershed( mCurrentWatershed );
mWatershedRunoffModelsModel->setWatershedRunoffModels( watershed->runoffModels() );
ui->tableViewRunoff->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
ui->checkBoxUseConstantTimeStep->setChecked( watershed->usedConstantTimeStepForOutputHydrograph() );
ui->constantHydrographTimeStep->durationParameter()->setValue( watershed->timeStepForOutputHydrograph() );
syncTransferFunction( watershed->currentTransferFunction() );
}

mRunoffHydrographStore->setWatershed( mCurrentWatershed );

updateRainfall();
}

Expand Down Expand Up @@ -362,7 +366,7 @@ void ReosRunoffHydrographWidget::onHydrographReady( ReosHydrograph *hydrograph )

if ( hydrograph == mCurrentHydrograph )
{
mHydrographCurve->setTimeSerie( mCurrentHydrograph );
mHydrographCurve->setTimeSerie( mCurrentHydrograph, true, false );

mHydrographResultModel->clearSerie();
if ( mCurrentHydrograph )
Expand Down

0 comments on commit fc0d41a

Please sign in to comment.