mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5539 Load Analysis plots when opening project
This commit is contained in:
parent
bec8afaf39
commit
66d98b3d23
@ -40,6 +40,8 @@
|
||||
#include "RicfObjectCapability.h"
|
||||
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "RimAnalysisPlot.h"
|
||||
#include "RimAnalysisPlotCollection.h"
|
||||
#include "RimAnnotationCollection.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimAnnotationTextAppearance.h"
|
||||
@ -1540,6 +1542,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
RimPltPlotCollection* pltColl = nullptr;
|
||||
RimGridCrossPlotCollection* gcpColl = nullptr;
|
||||
RimSaturationPressurePlotCollection* sppColl = nullptr;
|
||||
RimAnalysisPlotCollection* alsColl = nullptr;
|
||||
RimMultiPlotCollection* gpwColl = nullptr;
|
||||
|
||||
if ( m_project->mainPlotCollection() )
|
||||
@ -1576,6 +1579,10 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
{
|
||||
sppColl = m_project->mainPlotCollection()->saturationPressurePlotCollection();
|
||||
}
|
||||
if ( m_project->mainPlotCollection()->analysisPlotCollection() )
|
||||
{
|
||||
alsColl = m_project->mainPlotCollection()->analysisPlotCollection();
|
||||
}
|
||||
if ( m_project->mainPlotCollection()->multiPlotCollection() )
|
||||
{
|
||||
gpwColl = m_project->mainPlotCollection()->multiPlotCollection();
|
||||
@ -1591,6 +1598,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
||||
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
|
||||
plotCount += sppColl ? sppColl->plots().size() : 0;
|
||||
plotCount += alsColl ? alsColl->plots().size() : 0;
|
||||
plotCount += gpwColl ? gpwColl->multiPlots().size() : 0;
|
||||
|
||||
if ( plotCount > 0 )
|
||||
@ -1666,6 +1674,15 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
}
|
||||
}
|
||||
|
||||
if ( alsColl )
|
||||
{
|
||||
for ( const auto& alsPlot : alsColl->plots() )
|
||||
{
|
||||
alsPlot->loadDataAndUpdate();
|
||||
plotProgress.incrementProgress();
|
||||
}
|
||||
}
|
||||
|
||||
if ( gpwColl )
|
||||
{
|
||||
for ( const auto& multiPlot : gpwColl->multiPlots() )
|
||||
|
@ -36,7 +36,9 @@ RimAnalysisPlotCollection::RimAnalysisPlotCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimAnalysisPlotCollection::~RimAnalysisPlotCollection() {}
|
||||
RimAnalysisPlotCollection::~RimAnalysisPlotCollection()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -71,6 +73,14 @@ void RimAnalysisPlotCollection::removeSummaryPlot( RimAnalysisPlot* analysisPlot
|
||||
m_analysisPlots.removeChildObject( analysisPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimAnalysisPlot*> RimAnalysisPlotCollection::plots()
|
||||
{
|
||||
return m_analysisPlots.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
void updateSummaryNameHasChanged();
|
||||
void removeSummaryPlot( RimAnalysisPlot* analysisPlot );
|
||||
|
||||
std::vector<RimAnalysisPlot*> plots();
|
||||
|
||||
void deleteAllChildObjects();
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user