mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve reload and replace of cases
* Move code to from features to helper classes * Ask user if replace case should also happen for the associated grid or summary file
This commit is contained in:
@@ -20,17 +20,12 @@
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
#include "RicReplaceSummaryCaseFeature.h"
|
||||
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimObservedDataCollection.h"
|
||||
#include "RimObservedSummaryData.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryMultiPlotCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -39,18 +34,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicReloadSummaryCaseFeature, "RicReloadSummaryCaseFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicReloadSummaryCaseFeature::reloadSummaryCase( RimSummaryCase* summaryCase )
|
||||
{
|
||||
summaryCase->createSummaryReaderInterface();
|
||||
summaryCase->createRftReaderInterface();
|
||||
summaryCase->refreshMetaData();
|
||||
|
||||
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -69,12 +52,10 @@ void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
|
||||
for ( RimSummaryCase* summaryCase : caseSelection )
|
||||
{
|
||||
reloadSummaryCase( summaryCase );
|
||||
RiaSummaryTools::reloadSummaryCase( summaryCase );
|
||||
|
||||
RiaLogging::info( QString( "Reloaded data for %1" ).arg( summaryCase->summaryHeaderFilename() ) );
|
||||
}
|
||||
|
||||
RimMainPlotCollection::current()->loadDataAndUpdateAllPlots();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user