From 6440bd5b8da509a5ba4fdf6f806eb6d5abc9c35e Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 29 Sep 2021 13:47:26 +0200 Subject: [PATCH] #8052 StimPlan Model Plot: tweak default shown tracks. --- .../RicNewStimPlanModelPlotFeature.cpp | 17 +++++++++++--- .../RicNewStimPlanModelPlotFeature.h | 3 ++- .../StimPlanModel/RimStimPlanModelPlot.cpp | 22 ------------------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp index 512297f761..d0daf09a2e 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp @@ -356,7 +356,7 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot plotTrack->setColSpan( RimPlot::TWO ); plotTrack->setLegendsVisible( true ); plotTrack->setPlotTitleVisible( true ); - plotTrack->setShowWindow( shouldShowByDefault( propertyTypes ) ); + plotTrack->setShowWindow( shouldShowByDefault( propertyTypes, stimPlanModel->useDetailedFluidLoss() ) ); caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors(); @@ -472,11 +472,16 @@ RimStimPlanModelPlotCollection* RicNewStimPlanModelPlotFeature::stimPlanModelPlo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewStimPlanModelPlotFeature::shouldShowByDefault( const std::vector& propertyTypes ) +bool RicNewStimPlanModelPlotFeature::shouldShowByDefault( const std::vector& propertyTypes, + bool useDetailedFluidLoss ) { std::vector defaultPropertyTypes = { + RiaDefines::CurveProperty::FACIES, + RiaDefines::CurveProperty::POROSITY, RiaDefines::CurveProperty::INITIAL_PRESSURE, RiaDefines::CurveProperty::PRESSURE, + RiaDefines::CurveProperty::PERMEABILITY_X, + RiaDefines::CurveProperty::PERMEABILITY_Z, RiaDefines::CurveProperty::STRESS, RiaDefines::CurveProperty::INITIAL_STRESS, RiaDefines::CurveProperty::STRESS_GRADIENT, @@ -484,9 +489,15 @@ bool RicNewStimPlanModelPlotFeature::shouldShowByDefault( const std::vector& propertyTypes, bool isPlotLogarithmic = false ); - static bool shouldShowByDefault( const std::vector& propertyTypes ); + static bool shouldShowByDefault( const std::vector& propertyTypes, + bool useDetailedFluidLoss ); static RimStimPlanModelPlot* createStimPlanModelPlot( bool showAfterCreation, const QString& plotDescription ); diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPlot.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPlot.cpp index 6545473202..67a0b057d0 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPlot.cpp @@ -161,28 +161,6 @@ void RimStimPlanModelPlot::onLoadDataAndUpdate() m_eclipseCase = stimPlanModel()->eclipseCaseForProperty( RiaDefines::CurveProperty::UNDEFINED ); m_timeStep = stimPlanModel()->timeStep(); updateConnectedEditors(); - - // Enable and disable detailed fluid loss curves - std::vector fluidLossCurves = { RiaDefines::CurveProperty::PORO_ELASTIC_CONSTANT, - RiaDefines::CurveProperty::RELATIVE_PERMEABILITY_FACTOR, - RiaDefines::CurveProperty::THERMAL_EXPANSION_COEFFICIENT, - RiaDefines::CurveProperty::IMMOBILE_FLUID_SATURATION }; - - bool detailedFluidLoss = stimPlanModel()->useDetailedFluidLoss(); - - for ( auto curveProperty : fluidLossCurves ) - { - RimWellLogExtractionCurve* curve = findCurveByProperty( curveProperty ); - if ( curve ) - { - RimWellLogTrack* track = nullptr; - curve->firstAncestorOfType( track ); - if ( track ) - { - track->setShowWindow( detailedFluidLoss ); - } - } - } } RimDepthTrackPlot::onLoadDataAndUpdate();