mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Only show cross plot group for cross plots
This commit is contained in:
@@ -1164,7 +1164,7 @@ void RimEnsembleCurveSet::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde
|
||||
bool showStatisticsColor = m_colorMode() == RimEnsembleCurveSetColorManager::ColorMode::SINGLE_COLOR;
|
||||
m_statistics->showColorField( showStatisticsColor );
|
||||
|
||||
m_statistics->defineUiOrdering( uiConfigName, *statGroup );
|
||||
m_statistics->defaultUiOrdering( isXAxisSummaryVector(), *statGroup );
|
||||
|
||||
caf::PdmUiGroup* statAppearance = statGroup->addNewGroupWithKeyword( "Appearance", "StatisticsAppearance" );
|
||||
statAppearance->add( &m_statisticsUseCustomAppearance );
|
||||
|
||||
@@ -239,31 +239,7 @@ void RimEnsembleStatistics::showColorField( bool show )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleStatistics::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_showEnsembleCurves )
|
||||
{
|
||||
auto curveSet = m_parentCurveSet;
|
||||
if ( !curveSet ) return;
|
||||
|
||||
curveSet->updateAllCurves();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
auto curveSet = m_parentCurveSet;
|
||||
if ( !curveSet ) return;
|
||||
|
||||
curveSet->updateStatisticsCurves();
|
||||
|
||||
// Trigger update of tree view editor for ensemble curve set as they depend on these fields
|
||||
if ( changedField == &m_active || changedField == &m_basedOnFilteredCases || changedField == &m_color ) curveSet->updateEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
void RimEnsembleStatistics::defaultUiOrdering( bool showCrossPlotGroup, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
auto curveSet = m_parentCurveSet;
|
||||
|
||||
@@ -275,9 +251,12 @@ void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
uiOrdering.add( &m_includeIncompleteCurves );
|
||||
uiOrdering.add( &m_showCurveLabels );
|
||||
|
||||
auto crossPlotGroup = uiOrdering.addNewGroup( "Cross Plot" );
|
||||
crossPlotGroup->add( &m_crossPlotCurvesBinCount );
|
||||
crossPlotGroup->add( &m_crossPlotCurvesStatisticsRealizationCountThresholdPerBin );
|
||||
if ( showCrossPlotGroup )
|
||||
{
|
||||
auto crossPlotGroup = uiOrdering.addNewGroup( "Cross Plot" );
|
||||
crossPlotGroup->add( &m_crossPlotCurvesBinCount );
|
||||
crossPlotGroup->add( &m_crossPlotCurvesStatisticsRealizationCountThresholdPerBin );
|
||||
}
|
||||
|
||||
if ( m_showColorField ) uiOrdering.add( &m_color );
|
||||
|
||||
@@ -301,6 +280,39 @@ void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleStatistics::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_showEnsembleCurves )
|
||||
{
|
||||
auto curveSet = m_parentCurveSet;
|
||||
if ( !curveSet ) return;
|
||||
|
||||
curveSet->updateAllCurves();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
auto curveSet = m_parentCurveSet;
|
||||
if ( !curveSet ) return;
|
||||
|
||||
curveSet->updateStatisticsCurves();
|
||||
|
||||
// Trigger update of tree view editor for ensemble curve set as they depend on these fields
|
||||
if ( changedField == &m_active || changedField == &m_basedOnFilteredCases || changedField == &m_color ) curveSet->updateEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
bool showCrossPlot = true;
|
||||
defaultUiOrdering( showCrossPlot, uiOrdering );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -63,10 +63,11 @@ public:
|
||||
|
||||
void showColorField( bool show );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defaultUiOrdering( bool showCrossPlotGroup, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
bool onShowEnsembleCurves() const;
|
||||
void onSetShowEnsembleCurves( const bool& enable );
|
||||
|
||||
|
||||
@@ -482,8 +482,9 @@ void RimEnsembleWellLogCurveSet::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
}
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* statGroup = uiOrdering.addNewGroup( "Statistics" );
|
||||
m_statistics->defineUiOrdering( uiConfigName, *statGroup );
|
||||
caf::PdmUiGroup* statGroup = uiOrdering.addNewGroup( "Statistics" );
|
||||
bool showCrossPlotGroup = false;
|
||||
m_statistics->defaultUiOrdering( showCrossPlotGroup, *statGroup );
|
||||
|
||||
caf::PdmUiGroup* curveAppearanceGroup = uiOrdering.addNewGroup( "Curve Appearance" );
|
||||
QString configName = "AppearanceOrdering";
|
||||
|
||||
Reference in New Issue
Block a user