mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1001 Reload all plots when a case is reloaded
This commit is contained in:
parent
201ff5699d
commit
813652477d
ApplicationCode/ProjectDataModel
@ -61,7 +61,7 @@ public:
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
virtual QWidget* viewWidget() override;
|
||||
virtual void zoomAll() override;
|
||||
|
@ -42,6 +42,12 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimFlowPlotCollection.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimFlowCharacteristicsPlot.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
|
||||
#include "cafPdmDocument.h"
|
||||
#include "cafProgressInfo.h"
|
||||
@ -659,6 +665,36 @@ void RimEclipseCase::releaseResultData()
|
||||
CVF_ASSERT(reservoirView);
|
||||
reservoirView->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
if (project)
|
||||
{
|
||||
if (project->mainPlotCollection())
|
||||
{
|
||||
RimWellLogPlotCollection* wellPlotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||
RimSummaryPlotCollection* summaryPlotCollection = project->mainPlotCollection()->summaryPlotCollection();
|
||||
RimFlowPlotCollection* flowPlotCollection = project->mainPlotCollection()->flowPlotCollection();
|
||||
|
||||
if (wellPlotCollection)
|
||||
{
|
||||
for (size_t i = 0; i < wellPlotCollection->wellLogPlots().size(); ++i)
|
||||
{
|
||||
wellPlotCollection->wellLogPlots()[i]->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
if (summaryPlotCollection)
|
||||
{
|
||||
for (size_t i = 0; i < summaryPlotCollection->summaryPlots().size(); ++i)
|
||||
{
|
||||
summaryPlotCollection->summaryPlots()[i]->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
if (flowPlotCollection)
|
||||
{
|
||||
flowPlotCollection->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ bool RimEclipseInputCase::openEclipseGridFile()
|
||||
void RimEclipseInputCase::reloadEclipseGridFile()
|
||||
{
|
||||
setReservoirData(nullptr);
|
||||
openEclipseGridFile();
|
||||
openReserviorCase();
|
||||
}
|
||||
|
||||
#define for_all(stdVector, indexName) for (size_t indexName = 0; indexName < stdVector.size(); ++indexName)
|
||||
|
@ -155,7 +155,8 @@ void RimEclipseResultCase::reloadEclipseGridFile()
|
||||
{
|
||||
m_gridAndWellDataIsReadFromFile = false;
|
||||
m_activeCellInfoIsReadFromFile = false;
|
||||
openEclipseGridFile();
|
||||
setReservoirData(nullptr);
|
||||
openReserviorCase();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -180,7 +180,7 @@ bool RimEclipseStatisticsCase::openEclipseGridFile()
|
||||
void RimEclipseStatisticsCase::reloadEclipseGridFile()
|
||||
{
|
||||
setReservoirData(nullptr);
|
||||
openEclipseGridFile();
|
||||
openReserviorCase();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
caf::PdmObject* findRimCurveFromQwtCurve(const QwtPlotCurve* curve) const;
|
||||
size_t curveCount() const;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
void detachAllCurves();
|
||||
void updateCaseNameHasChanged();
|
||||
|
Loading…
Reference in New Issue
Block a user