mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -46,8 +46,6 @@
|
||||
#include "RimGeoMechResultDefinition.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellBoreStabilityPlot.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
@@ -438,10 +436,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
||||
|
||||
clampBranchIndex();
|
||||
|
||||
RimMainPlotCollection* mainPlotCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted( mainPlotCollection );
|
||||
|
||||
RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection();
|
||||
RimWellLogPlotCollection* wellLogCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor;
|
||||
@@ -696,15 +691,7 @@ std::set<QString> RimWellLogExtractionCurve::sortedSimWellNames()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogExtractionCurve::clearGeneratedSimWellPaths()
|
||||
{
|
||||
RimWellLogPlotCollection* wellLogCollection = nullptr;
|
||||
|
||||
// Need to use this approach, and not firstAnchestor because the curve might not be inside the hierarchy when
|
||||
// deleted.
|
||||
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj && proj->mainPlotCollection() ) wellLogCollection = proj->mainPlotCollection()->wellLogPlotCollection();
|
||||
|
||||
if ( !wellLogCollection ) return;
|
||||
RimWellLogPlotCollection* wellLogCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
|
||||
|
||||
for ( auto wellPath : m_wellPathsWithExtractors )
|
||||
{
|
||||
|
||||
@@ -173,8 +173,8 @@ RimWellLogRftCurve::RimWellLogRftCurve()
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellLogChannelName, "WellLogChannelName", "Well Property" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_rftDataType, "RftDataType", "Data Type" );
|
||||
|
||||
CAF_PDM_InitField( &m_segmentResultName, "SegmentResultName", RiaResultNames::undefinedResultName(), "Segment Result Name" );
|
||||
CAF_PDM_InitField( &m_segmentBranchIndex, "SegmentBranchIndex", -1, "Segment Branch" );
|
||||
CAF_PDM_InitField( &m_segmentResultName, "SegmentResultName", RiaResultNames::undefinedResultName(), "Result Name" );
|
||||
CAF_PDM_InitField( &m_segmentBranchIndex, "SegmentBranchIndex", -1, "Branch" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_segmentBranchType, "SegmentBranchType", "Branch Type" );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user