diff --git a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.cxx b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.cxx index 41995ae8b3283ce9b78e0babe3ac9177a228bc8f..1878de3719b370f6df068e91b4ade08732a1baf8 100644 --- a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.cxx +++ b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.cxx @@ -38,6 +38,7 @@ // // Monteverdi includes (sorted by alphabetic order) +#include "mvdCore.h" #include "mvdGui.h" #include "mvdI18nApplication.h" #include "mvdI18nMainWindow.h" @@ -129,6 +130,35 @@ PreferencesDialog .toString() ); + // + // GDAL overviews. + { + QVariant value( + I18nApplication::Instance()->RetrieveSettingsKey( + I18nCoreApplication::SETTINGS_KEY_OVERVIEWS_ENABLED + ) + ); + + m_UI->overviewsCheckBox->setChecked( + !value.isValid() + ? OVERVIEWS_ENABLED_DEFAULT + : value.toBool() + ); + } + { + QVariant value( + I18nApplication::Instance()->RetrieveSettingsKey( + I18nCoreApplication::SETTINGS_KEY_OVERVIEWS_SIZE + ) + ); + + m_UI->overviewsSpinBox->setValue( + !value.isValid() + ? OVERVIEWS_SIZE_DEFAULT + : value.toInt() + ); + } + // // Rendering settings. { @@ -140,7 +170,7 @@ PreferencesDialog m_UI->resolutionComboBox->setCurrentIndex( !value.isValid() - ? RESOLUTION_LOWER + ? RESOLUTION_DEFAULT : value.toInt() ); } @@ -261,6 +291,17 @@ PreferencesDialog m_UI->geoidLineEdit->text() ); + // + // Overview settings. + I18nApplication::Instance()->StoreSettingsKey( + I18nCoreApplication::SETTINGS_KEY_OVERVIEWS_ENABLED, + m_UI->overviewsCheckBox->isChecked() + ); + I18nApplication::Instance()->StoreSettingsKey( + I18nCoreApplication::SETTINGS_KEY_OVERVIEWS_SIZE, + m_UI->overviewsSpinBox->value() + ); + // // Rendering settings. I18nApplication::Instance()->StoreSettingsKey(