Support setting of child fields from Python and pass in WbsParameters if provided

Also fixes #5354
This commit is contained in:
Gaute Lindkvist
2020-01-17 10:35:42 +01:00
parent 5b8b76179b
commit 954bf1e02e
27 changed files with 314 additions and 174 deletions

View File

@@ -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 );

View File

@@ -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

View File

@@ -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 );

View File

@@ -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,