#2137 Formation Names: Update all plots necessary when changing formation names on case

This commit is contained in:
Rebecca Cox 2017-12-01 10:26:32 +01:00
parent 86e348a9f8
commit 8d7a578d6f
4 changed files with 97 additions and 16 deletions

View File

@ -24,25 +24,35 @@
#ifdef USE_ODB_API
#include "RifOdbReader.h"
#endif
#include "RigFemScalarResultFrames.h"
#include "RigStatisticsDataCache.h"
#include "RigFemPartResults.h"
#include "RiaApplication.h"
#include "RigFemNativeStatCalc.h"
#include "RigFemPartCollection.h"
#include "RigFemPartGrid.h"
#include "RigFemPartResults.h"
#include "RigFemScalarResultFrames.h"
#include "RigFormationNames.h"
#include "RigStatisticsDataCache.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "cafProgressInfo.h"
#include "cvfBoundingBox.h"
#include <QString>
#include <cmath>
#include <stdlib.h>
#include "RigFemNativeStatCalc.h"
#include "cafTensor3.h"
#include "cafProgressInfo.h"
#include "RigFemPartGrid.h"
#include "cafTensor3.h"
#include "cvfGeometryTools.h"
#include "cvfMath.h"
#include <QString>
#include <stdlib.h>
#include <cmath>
//--------------------------------------------------------------------------------------------------
///
@ -80,6 +90,23 @@ RigFemPartResultsCollection::~RigFemPartResultsCollection()
void RigFemPartResultsCollection::setActiveFormationNames(RigFormationNames* activeFormationNames)
{
m_activeFormationNamesData = activeFormationNames;
RimProject* project = RiaApplication::instance()->project();
if (project)
{
if (project->mainPlotCollection())
{
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
if (plotCollection)
{
for (RimWellLogPlot* wellLogPlot : plotCollection->wellLogPlots)
{
wellLogPlot->loadDataAndUpdate();
}
}
}
}
this->deleteResult(RigFemResultAddress(RIG_FORMATION_NAMES, "Active Formation Names", ""));
}

View File

@ -19,17 +19,21 @@
#include "RimMainPlotCollection.h"
#include "RimFlowCharacteristicsPlot.h"
#include "RimFlowPlotCollection.h"
#include "RimProject.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimRftPlotCollection.h"
#include "RimPltPlotCollection.h"
#include "RimProject.h"
#include "RimRftPlotCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RimViewWindow.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPltPlot.h"
#include "RimWellRftPlot.h"
#include "RiuMainWindow.h"
#include "RiuProjectPropertyView.h"
#include "RimFlowCharacteristicsPlot.h"
CAF_PDM_SOURCE_INIT(RimMainPlotCollection, "MainPlotCollection");
@ -171,3 +175,38 @@ void RimMainPlotCollection::updateCurrentTimeStepInPlots()
m_flowPlotCollection()->defaultFlowCharacteristicsPlot()->updateCurrentTimeStep();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMainPlotCollection::updatePlotsWithFormations()
{
if (m_wellLogPlotCollection)
{
for (RimWellLogPlot* wellLogPlot : m_wellLogPlotCollection->wellLogPlots())
{
wellLogPlot->loadDataAndUpdate();
}
}
if (m_pltPlotCollection)
{
for (RimWellPltPlot* pltPlot : m_pltPlotCollection->pltPlots())
{
pltPlot->loadDataAndUpdate();
}
}
if (m_rftPlotCollection)
{
for (RimWellRftPlot* rftPlot : m_rftPlotCollection->rftPlots())
{
rftPlot->loadDataAndUpdate();
}
}
if (m_flowPlotCollection)
{
m_flowPlotCollection->loadDataAndUpdate();
}
}

View File

@ -58,6 +58,7 @@ public:
void deleteAllContainedObjects();
void updateCurrentTimeStepInPlots();
void updatePlotsWithFormations();
private:

View File

@ -20,18 +20,24 @@
#include "RigEclipseCaseData.h"
#include "RiaApplication.h"
#include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigFormationNames.h"
#include "RigMainGrid.h"
#include "RigResultAccessorFactory.h"
#include "RigSimWellData.h"
#include <QDebug>
#include "RigSimulationWellCenterLineCalculator.h"
#include "RigSimulationWellCoordsAndMD.h"
#include "RigWellPath.h"
#include "RimFlowPlotCollection.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include <QDebug>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -670,6 +676,14 @@ void RigEclipseCaseData::setActiveFormationNames(RigFormationNames* activeFormat
}
}
RimProject* project = RiaApplication::instance()->project();
if (project)
{
if (project->mainPlotCollection())
{
project->mainPlotCollection->updatePlotsWithFormations();
}
}
}
//--------------------------------------------------------------------------------------------------