Merge pull request #8614 from OPM/minor-adjustments

This commit is contained in:
Magne Sjaastad
2022-03-04 12:24:15 +01:00
committed by GitHub
parent abff06d2d5
commit 1563ae7b58
9 changed files with 59 additions and 30 deletions

View File

@@ -54,6 +54,7 @@ RimPlotAxisProperties::RimPlotAxisProperties()
, axisPositionChanged( this )
, m_enableTitleTextSettings( true )
, m_isRangeSettingsEnabled( true )
, m_isAlwaysRequired( false )
{
CAF_PDM_InitObject( "Axis Properties", ":/LeftAxis16x16.png" );
@@ -97,13 +98,20 @@ RimPlotAxisProperties::RimPlotAxisProperties()
updateOptionSensitivity();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotAxisProperties::setAlwaysRequired( bool enable )
{
m_isAlwaysRequired = enable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimPlotAxisProperties::isDeletable() const
{
// The default axes (which have index 0) are not deletable
return m_plotAxisIndex != 0;
return !m_isAlwaysRequired;
}
//--------------------------------------------------------------------------------------------------
@@ -210,6 +218,7 @@ void RimPlotAxisProperties::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
scaleGroup.add( &m_valuesFontSize );
scaleGroup.add( &m_plotAxis );
m_plotAxis.uiCapability()->setUiReadOnly( m_isAlwaysRequired );
uiOrdering.skipRemainingFields( true );
}