mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Allow using scale values less than 1.0 (#9108)
* Change view scale into list of predefined double values in both toolbar and property editor. Add values less than 1.0
This commit is contained in:
committed by
Magne Sjaastad
parent
3a55db15e5
commit
1a4d29f4ba
@@ -345,3 +345,11 @@ QString RiaDefines::stringListSeparator()
|
||||
{
|
||||
return "|";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RiaDefines::viewScaleOptions()
|
||||
{
|
||||
return { 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0 };
|
||||
}
|
||||
|
||||
@@ -225,4 +225,6 @@ constexpr enum MultiPlotPageUpdateType operator&( const enum MultiPlotPageUpdate
|
||||
return ( enum MultiPlotPageUpdateType )( uint32_t( selfValue ) & uint32_t( inValue ) );
|
||||
}
|
||||
|
||||
std::vector<double> viewScaleOptions();
|
||||
|
||||
}; // namespace RiaDefines
|
||||
|
||||
@@ -1476,10 +1476,11 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
rim3dView->applyBackgroundColorAndFontChanges();
|
||||
}
|
||||
|
||||
if ( oldPreferences && ( applySettingsToAllViews ||
|
||||
rim3dView->scaleZ == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
if ( oldPreferences &&
|
||||
( applySettingsToAllViews ||
|
||||
rim3dView->scaleZ() == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
{
|
||||
rim3dView->scaleZ = static_cast<double>( m_preferences->defaultScaleFactorZ() );
|
||||
rim3dView->setScaleZ( static_cast<double>( m_preferences->defaultScaleFactorZ() ) );
|
||||
rim3dView->updateScaling();
|
||||
if ( rim3dView == activeViewWindow() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user