Skip to content

Commit c4299f4

Browse files
committed
reload scales list only when necessary
1 parent fbb7b3c commit c4299f4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/app/qgisapp.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -5284,13 +5284,15 @@ void QgisApp::options()
52845284
return;
52855285
}
52865286

5287+
QSettings mySettings;
5288+
QString oldScales = mySettings.value( "Map/scales", PROJECT_SCALES ).toString();
5289+
52875290
QgsOptions *optionsDialog = new QgsOptions( this );
52885291
if ( optionsDialog->exec() )
52895292
{
52905293
// set the theme if it changed
52915294
setTheme( optionsDialog->theme() );
52925295

5293-
QSettings mySettings;
52945296
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing" ).toBool() );
52955297
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render" ).toBool() );
52965298

@@ -5304,7 +5306,10 @@ void QgisApp::options()
53045306
mRasterFileFilter.clear();
53055307
QgsRasterLayer::buildSupportedRasterFileFilter( mRasterFileFilter );
53065308

5307-
mScaleEdit->updateScales();
5309+
if ( oldScales != mySettings.value( "Map/scales", PROJECT_SCALES ).toString() )
5310+
{
5311+
mScaleEdit->updateScales();
5312+
}
53085313
}
53095314

53105315
delete optionsDialog;

0 commit comments

Comments
 (0)