Add updateCurveAppearance() to stackable curve

This commit is contained in:
Magne Sjaastad
2023-10-12 14:08:49 +02:00
parent 55cafc64c3
commit 0f4d2a61f6
3 changed files with 34 additions and 14 deletions

View File

@@ -15,6 +15,7 @@
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimStackablePlotCurve.h"
#include "RiaColorTables.h"
@@ -107,11 +108,7 @@ void RimStackablePlotCurve::setIsStacked( bool stacked )
{
m_isStacked = stacked;
if ( !m_isStacked() && fillStyle() != Qt::NoBrush )
{
// Switch off area fill when turning off stacking.
setFillStyle( Qt::NoBrush );
}
updateStackingAppearance();
stackingChanged.send( m_isStacked() );
}
@@ -124,11 +121,7 @@ void RimStackablePlotCurve::fieldChangedByUi( const caf::PdmFieldHandle* changed
if ( changedField == &m_isStacked )
{
if ( !m_isStacked() && fillStyle() != Qt::NoBrush )
{
// Switch off area fill when turning off stacking.
setFillStyle( Qt::NoBrush );
}
updateStackingAppearance();
stackingChanged.send( m_isStacked() );
}
else if ( changedField == &m_isStackedWithPhaseColors )
@@ -174,3 +167,25 @@ void RimStackablePlotCurve::defaultUiOrdering( caf::PdmUiOrdering& uiOrdering )
nameGroup->add( &m_showLegend );
RimPlotCurve::curveNameUiOrdering( *nameGroup );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStackablePlotCurve::updateCurveAppearance()
{
updateStackingAppearance();
RimPlotCurve::updateCurveAppearance();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStackablePlotCurve::updateStackingAppearance()
{
if ( !m_isStacked() && fillStyle() != Qt::NoBrush )
{
// Switch off area fill when turning off stacking.
setFillStyle( Qt::NoBrush );
}
}