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:
@@ -40,6 +40,8 @@
|
|||||||
#include "RicfObjectCapability.h"
|
#include "RicfObjectCapability.h"
|
||||||
|
|
||||||
#include "Rim2dIntersectionViewCollection.h"
|
#include "Rim2dIntersectionViewCollection.h"
|
||||||
|
#include "RimAnalysisPlot.h"
|
||||||
|
#include "RimAnalysisPlotCollection.h"
|
||||||
#include "RimAnnotationCollection.h"
|
#include "RimAnnotationCollection.h"
|
||||||
#include "RimAnnotationInViewCollection.h"
|
#include "RimAnnotationInViewCollection.h"
|
||||||
#include "RimAnnotationTextAppearance.h"
|
#include "RimAnnotationTextAppearance.h"
|
||||||
@@ -1540,6 +1542,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
RimPltPlotCollection* pltColl = nullptr;
|
RimPltPlotCollection* pltColl = nullptr;
|
||||||
RimGridCrossPlotCollection* gcpColl = nullptr;
|
RimGridCrossPlotCollection* gcpColl = nullptr;
|
||||||
RimSaturationPressurePlotCollection* sppColl = nullptr;
|
RimSaturationPressurePlotCollection* sppColl = nullptr;
|
||||||
|
RimAnalysisPlotCollection* alsColl = nullptr;
|
||||||
RimMultiPlotCollection* gpwColl = nullptr;
|
RimMultiPlotCollection* gpwColl = nullptr;
|
||||||
|
|
||||||
if ( m_project->mainPlotCollection() )
|
if ( m_project->mainPlotCollection() )
|
||||||
@@ -1576,6 +1579,10 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
{
|
{
|
||||||
sppColl = m_project->mainPlotCollection()->saturationPressurePlotCollection();
|
sppColl = m_project->mainPlotCollection()->saturationPressurePlotCollection();
|
||||||
}
|
}
|
||||||
|
if ( m_project->mainPlotCollection()->analysisPlotCollection() )
|
||||||
|
{
|
||||||
|
alsColl = m_project->mainPlotCollection()->analysisPlotCollection();
|
||||||
|
}
|
||||||
if ( m_project->mainPlotCollection()->multiPlotCollection() )
|
if ( m_project->mainPlotCollection()->multiPlotCollection() )
|
||||||
{
|
{
|
||||||
gpwColl = m_project->mainPlotCollection()->multiPlotCollection();
|
gpwColl = m_project->mainPlotCollection()->multiPlotCollection();
|
||||||
@@ -1591,6 +1598,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
||||||
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
|
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
|
||||||
plotCount += sppColl ? sppColl->plots().size() : 0;
|
plotCount += sppColl ? sppColl->plots().size() : 0;
|
||||||
|
plotCount += alsColl ? alsColl->plots().size() : 0;
|
||||||
plotCount += gpwColl ? gpwColl->multiPlots().size() : 0;
|
plotCount += gpwColl ? gpwColl->multiPlots().size() : 0;
|
||||||
|
|
||||||
if ( plotCount > 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 )
|
if ( gpwColl )
|
||||||
{
|
{
|
||||||
for ( const auto& multiPlot : gpwColl->multiPlots() )
|
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 );
|
m_analysisPlots.removeChildObject( analysisPlot );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimAnalysisPlot*> RimAnalysisPlotCollection::plots()
|
||||||
|
{
|
||||||
|
return m_analysisPlots.childObjects();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ public:
|
|||||||
void updateSummaryNameHasChanged();
|
void updateSummaryNameHasChanged();
|
||||||
void removeSummaryPlot( RimAnalysisPlot* analysisPlot );
|
void removeSummaryPlot( RimAnalysisPlot* analysisPlot );
|
||||||
|
|
||||||
|
std::vector<RimAnalysisPlot*> plots();
|
||||||
|
|
||||||
void deleteAllChildObjects();
|
void deleteAllChildObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user