mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add convenience function to set number format to fixed with two decimals
This commit is contained in:
@@ -392,12 +392,7 @@ void RimGridCrossPlotRegressionCurve::defineEditorAttribute( const caf::PdmField
|
||||
}
|
||||
else if ( field == &m_minExtrapolationRangeX || field == &m_maxExtrapolationRangeX )
|
||||
{
|
||||
auto doubleAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( doubleAttr )
|
||||
{
|
||||
doubleAttr->m_decimals = 2;
|
||||
doubleAttr->m_numberFormat = caf::PdmUiDoubleValueEditorAttribute::NumberFormat::FIXED;
|
||||
}
|
||||
caf::PdmUiDoubleValueEditorAttribute::testAndSetFixedWithTwoDecimals( attribute );
|
||||
}
|
||||
|
||||
else if ( field == &m_expressionText )
|
||||
|
||||
@@ -1228,12 +1228,7 @@ void RimDepthTrackPlot::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
{
|
||||
if ( field == &m_minVisibleDepth || field == &m_maxVisibleDepth )
|
||||
{
|
||||
auto doubleAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( doubleAttr )
|
||||
{
|
||||
doubleAttr->m_decimals = 2;
|
||||
doubleAttr->m_numberFormat = caf::PdmUiDoubleValueEditorAttribute::NumberFormat::FIXED;
|
||||
}
|
||||
caf::PdmUiDoubleValueEditorAttribute::testAndSetFixedWithTwoDecimals( attribute );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -896,12 +896,7 @@ void RimStimPlanModel::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
{
|
||||
if ( field == &m_formationDip || field == &m_barrierDip || field == &m_distanceToBarrier )
|
||||
{
|
||||
auto doubleAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( doubleAttr )
|
||||
{
|
||||
doubleAttr->m_decimals = 2;
|
||||
doubleAttr->m_numberFormat = caf::PdmUiDoubleValueEditorAttribute::NumberFormat::FIXED;
|
||||
}
|
||||
caf::PdmUiDoubleValueEditorAttribute::testAndSetFixedWithTwoDecimals( attribute );
|
||||
}
|
||||
|
||||
if ( field == &m_MD )
|
||||
|
||||
@@ -307,12 +307,7 @@ void RimStimPlanModelTemplate::defineEditorAttribute( const caf::PdmFieldHandle*
|
||||
{
|
||||
if ( field == &m_stressDepth || field == &m_verticalStress )
|
||||
{
|
||||
auto doubleAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( doubleAttr )
|
||||
{
|
||||
doubleAttr->m_decimals = 2;
|
||||
doubleAttr->m_numberFormat = caf::PdmUiDoubleValueEditorAttribute::NumberFormat::FIXED;
|
||||
}
|
||||
caf::PdmUiDoubleValueEditorAttribute::testAndSetFixedWithTwoDecimals( attribute );
|
||||
}
|
||||
|
||||
if ( field == &m_faciesInitialPressureConfigs )
|
||||
|
||||
Reference in New Issue
Block a user