Improve ensemble curve colors

* Use unique_ptr
* Improve default assignment of curve appearance
* Improve display of color tags in tree view items
* Select curve or ensemble instead of plot
* Only change curves connected to a Rim-object

* Improve color management for ensemble curves
Use a base color for statistics curves and set realization curves transparent
Make sure new curves are assigned a unique color
Harmonize how dropped addresses are handled

* Update all tags always
The update of tags for a subset of tree nodes is currently broken. Always update all tags.

* Add const
This commit is contained in:
Magne Sjaastad
2023-04-19 15:36:06 +02:00
committed by GitHub
parent d11f51fcae
commit 643ccd67b8
19 changed files with 399 additions and 170 deletions

View File

@@ -59,6 +59,8 @@ RimEnsembleStatistics::RimEnsembleStatistics( RimEnsembleCurveSetInterface* pare
// Set to always show curves before the version this feature was introduced in
m_showStatisticsCurveLegends = true;
}
m_showColorField = true;
}
//--------------------------------------------------------------------------------------------------
@@ -109,6 +111,14 @@ void RimEnsembleStatistics::disableMeanCurve( bool disable )
m_showMeanCurve.uiCapability()->setUiReadOnly( disable );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEnsembleStatistics::showColorField( bool show )
{
m_showColorField = show;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -124,7 +134,8 @@ void RimEnsembleStatistics::fieldChangedByUi( const caf::PdmFieldHandle* changed
curveSet->updateStatisticsCurves();
if ( changedField == &m_active || changedField == &m_basedOnFilteredCases ) curveSet->updateEditors();
// 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();
}
if ( changedField == &m_hideEnsembleCurves )
@@ -150,7 +161,8 @@ void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
uiOrdering.add( &m_basedOnFilteredCases );
uiOrdering.add( &m_includeIncompleteCurves );
uiOrdering.add( &m_showCurveLabels );
uiOrdering.add( &m_color );
if ( m_showColorField ) uiOrdering.add( &m_color );
auto group = uiOrdering.addNewGroup( "Curves" );
if ( !curveSet->hasMeanData() ) group->add( &m_warningLabel );