reload scales list only when necessary

This commit is contained in:
Alexander Bruy 2012-07-07 12:15:14 +03:00
parent fbb7b3c4e0
commit c4299f4bee

View File

@ -5284,13 +5284,15 @@ void QgisApp::options()
return;
}
QSettings mySettings;
QString oldScales = mySettings.value( "Map/scales", PROJECT_SCALES ).toString();
QgsOptions *optionsDialog = new QgsOptions( this );
if ( optionsDialog->exec() )
{
// set the theme if it changed
setTheme( optionsDialog->theme() );
QSettings mySettings;
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing" ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render" ).toBool() );
@ -5304,7 +5306,10 @@ void QgisApp::options()
mRasterFileFilter.clear();
QgsRasterLayer::buildSupportedRasterFileFilter( mRasterFileFilter );
mScaleEdit->updateScales();
if ( oldScales != mySettings.value( "Map/scales", PROJECT_SCALES ).toString() )
{
mScaleEdit->updateScales();
}
}
delete optionsDialog;