mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Simplify access to RimMainPlotCollection
* Add current() to RimMainPlotCollection to avoid include of RimProject * Remove "segment" prefix * Reload data when RftCase changes
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimObservedDataCollection.h"
|
||||
#include "RimObservedSummaryData.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
@@ -40,6 +39,18 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicReloadSummaryCaseFeature, "RicReloadSummaryCaseFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicReloadSummaryCaseFeature::reloadSummaryCase( RimSummaryCase* summaryCase )
|
||||
{
|
||||
summaryCase->createSummaryReaderInterface();
|
||||
summaryCase->createRftReaderInterface();
|
||||
summaryCase->refreshMetaData();
|
||||
|
||||
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -60,22 +71,12 @@ void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
|
||||
for ( RimSummaryCase* summaryCase : caseSelection )
|
||||
{
|
||||
summaryCase->createSummaryReaderInterface();
|
||||
summaryCase->createRftReaderInterface();
|
||||
summaryCase->refreshMetaData();
|
||||
|
||||
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
||||
reloadSummaryCase( summaryCase );
|
||||
|
||||
RiaLogging::info( QString( "Reloaded data for %1" ).arg( summaryCase->summaryHeaderFilename() ) );
|
||||
}
|
||||
|
||||
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
|
||||
{
|
||||
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
|
||||
{
|
||||
summaryPlot->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
RimMainPlotCollection::current()->loadDataAndUpdateAllPlots();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user