#6920 StimPlanModelPlot: show fewer curves by default.

This commit is contained in:
Kristian Bendiksen 2020-12-07 14:03:30 +01:00 committed by Magne Sjaastad
parent 4711901d6b
commit 2e113414e1
2 changed files with 31 additions and 0 deletions

View File

@ -356,6 +356,7 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot
plotTrack->setColSpan( RimPlot::TWO );
plotTrack->setLegendsVisible( true );
plotTrack->setPlotTitleVisible( true );
plotTrack->setShowWindow( shouldShowByDefault( propertyTypes ) );
caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors();
@ -467,3 +468,31 @@ RimStimPlanModelPlotCollection* RicNewStimPlanModelPlotFeature::stimPlanModelPlo
return mainPlotColl->stimPlanModelPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewStimPlanModelPlotFeature::shouldShowByDefault( const std::vector<RiaDefines::CurveProperty>& propertyTypes )
{
std::vector<RiaDefines::CurveProperty> defaultPropertyTypes = {
RiaDefines::CurveProperty::INITIAL_PRESSURE,
RiaDefines::CurveProperty::PRESSURE,
RiaDefines::CurveProperty::STRESS,
RiaDefines::CurveProperty::INITIAL_STRESS,
RiaDefines::CurveProperty::STRESS_GRADIENT,
RiaDefines::CurveProperty::YOUNGS_MODULUS,
RiaDefines::CurveProperty::POISSONS_RATIO,
RiaDefines::CurveProperty::K_IC,
RiaDefines::CurveProperty::PROPPANT_EMBEDMENT,
RiaDefines::CurveProperty::FLUID_LOSS_COEFFICIENT,
};
for ( auto propertyType : propertyTypes )
{
for ( auto defaultPropertyType : defaultPropertyTypes )
{
if ( propertyType == defaultPropertyType ) return true;
}
}
return false;
}

View File

@ -60,6 +60,8 @@ private:
const std::vector<RiaDefines::CurveProperty>& propertyTypes,
bool isPlotLogarithmic = false );
static bool shouldShowByDefault( const std::vector<RiaDefines::CurveProperty>& propertyTypes );
static RimStimPlanModelPlot* createStimPlanModelPlot( bool showAfterCreation, const QString& plotDescription );
static RimStimPlanModelPlotCollection* stimPlanModelPlotCollection();