Skip to content
Snippets Groups Projects
Commit 5ed6b48f authored by Stéphane Albert's avatar Stéphane Albert
Browse files

BUG: MANTIS-1267: Initialized overviews settings to default values in...

BUG: MANTIS-1267: Initialized overviews settings to default values in preferences dialog; Added serialization support for overviews settings.
parent a13efcbc
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment