Simplify access to RimMainPlotCollection

* Add current() to RimMainPlotCollection to avoid include of RimProject
* Remove "segment" prefix
* Reload data when RftCase changes
This commit is contained in:
Magne Sjaastad
2022-08-19 05:30:25 -07:00
committed by GitHub
parent 506bfbd638
commit 4cd38d7daf
51 changed files with 240 additions and 418 deletions

View File

@@ -66,7 +66,6 @@
#include "RimMainPlotCollection.h"
#include "RimMudWeightWindowParameters.h"
#include "RimProject.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
@@ -216,20 +215,10 @@ void RigFemPartResultsCollection::setActiveFormationNames( RigFormationNames* ac
{
m_activeFormationNamesData = activeFormationNames;
RimProject* project = RimProject::current();
if ( project )
RimWellLogPlotCollection* plotCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
for ( auto wellLogPlot : plotCollection->wellLogPlots() )
{
if ( project->mainPlotCollection() )
{
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
if ( plotCollection )
{
for ( auto wellLogPlot : plotCollection->wellLogPlots() )
{
wellLogPlot->loadDataAndUpdate();
}
}
}
wellLogPlot->loadDataAndUpdate();
}
this->deleteResult( RigFemResultAddress( RIG_FORMATION_NAMES, "Active Formation Names", "" ) );