mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
Add convenience function to set number format to fixed with two decimals
This commit is contained in:
1 parent
d8bd7bc81a
commit
337584025c
5 files changed
+19
-24
No files matched your search
@@ -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