mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support setting of child fields from Python and pass in WbsParameters if provided
Also fixes #5354
This commit is contained in:
@@ -66,12 +66,16 @@ CAF_CMD_SOURCE_INIT( RicNewWellBoreStabilityPlotFeature, "RicNewWellBoreStabilit
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellBoreStabilityPlot*
|
||||
RicNewWellBoreStabilityPlotFeature::createPlot( RimGeoMechCase* geoMechCase, RimWellPath* wellPath, int timeStep )
|
||||
RicNewWellBoreStabilityPlotFeature::createPlot( RimGeoMechCase* geoMechCase,
|
||||
RimWellPath* wellPath,
|
||||
int timeStep,
|
||||
const RimWbsParameters* parameters /* = nullptr*/ )
|
||||
{
|
||||
caf::ProgressInfo progInfo( 100, "Creating Well Bore Stability Plot" );
|
||||
|
||||
RimWellBoreStabilityPlot* plot = RicNewWellLogPlotFeatureImpl::createWellBoreStabilityPlot( false,
|
||||
"Well Bore Stability" );
|
||||
"Well Bore Stability",
|
||||
parameters );
|
||||
|
||||
{
|
||||
auto task = progInfo.task( "Creating formation track", 2 );
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
class RimGeoMechCase;
|
||||
class RimGeoMechView;
|
||||
class RimWbsParameters;
|
||||
class RimWellBoreStabilityPlot;
|
||||
class RimWellPath;
|
||||
|
||||
@@ -33,7 +34,10 @@ class RicNewWellBoreStabilityPlotFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
public:
|
||||
static RimWellBoreStabilityPlot* createPlot( RimGeoMechCase* geoMechCase, RimWellPath* wellPath, int timeStep );
|
||||
static RimWellBoreStabilityPlot* createPlot( RimGeoMechCase* geoMechCase,
|
||||
RimWellPath* wellPath,
|
||||
int timeStep,
|
||||
const RimWbsParameters* parameters = nullptr );
|
||||
|
||||
protected:
|
||||
// Overrides
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellBoreStabilityPlot*
|
||||
RicNewWellLogPlotFeatureImpl::createWellBoreStabilityPlot( bool showAfterCreation /*= true*/,
|
||||
const QString& plotDescription /*= QString("")*/ )
|
||||
const QString& plotDescription /*= QString("")*/,
|
||||
const RimWbsParameters* params /*= nullptr*/ )
|
||||
{
|
||||
RimWellLogPlotCollection* wellLogPlotColl = wellLogPlotCollection();
|
||||
CVF_ASSERT( wellLogPlotColl );
|
||||
@@ -52,6 +53,11 @@ RimWellBoreStabilityPlot*
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
|
||||
RimWellBoreStabilityPlot* plot = new RimWellBoreStabilityPlot();
|
||||
if ( params )
|
||||
{
|
||||
plot->copyWbsParameters( params );
|
||||
}
|
||||
|
||||
plot->setAsPlotMdiWindow();
|
||||
|
||||
wellLogPlotColl->wellLogPlots().push_back( plot );
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimWbsParameters;
|
||||
class RimWellBoreStabilityPlot;
|
||||
class RimWellLogPlotCollection;
|
||||
class RimWellLogPlot;
|
||||
@@ -33,7 +34,8 @@ class RicNewWellLogPlotFeatureImpl
|
||||
{
|
||||
public:
|
||||
static RimWellBoreStabilityPlot* createWellBoreStabilityPlot( bool showAfterCreation = true,
|
||||
const QString& plotDescription = QString( "" ) );
|
||||
const QString& plotDescription = QString( "" ),
|
||||
const RimWbsParameters* params = nullptr );
|
||||
static RimWellLogPlot* createWellLogPlot( bool showAfterCreation = true,
|
||||
const QString& plotDescription = QString( "" ) );
|
||||
static RimWellLogTrack* createWellLogPlotTrack( bool updateAfterCreation = true,
|
||||
|
||||
Reference in New Issue
Block a user