mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Settings update: Fix "geocoding"
Use the SettingsObjectWrapper to access "geocoding" Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8f05afcda3
commit
93c19b18a7
1 changed files with 8 additions and 9 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include "ui_prefs_georeference.h"
|
#include "ui_prefs_georeference.h"
|
||||||
#include "core/prefs-macros.h"
|
#include "core/prefs-macros.h"
|
||||||
#include "core/qthelper.h"
|
#include "core/qthelper.h"
|
||||||
|
#include "core/subsurface-qt/SettingsObjectWrapper.h"
|
||||||
#include "qt-models/divelocationmodel.h"
|
#include "qt-models/divelocationmodel.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
@ -33,13 +34,11 @@ void PreferencesGeoreference::refreshSettings()
|
||||||
|
|
||||||
void PreferencesGeoreference::syncSettings()
|
void PreferencesGeoreference::syncSettings()
|
||||||
{
|
{
|
||||||
QSettings s;
|
auto geocoding = SettingsObjectWrapper::instance()->geocoding;
|
||||||
s.beginGroup("geocoding");
|
geocoding->setEnableGeocoding(ui->enable_geocoding->isChecked());
|
||||||
s.setValue("enable_geocoding", ui->enable_geocoding->isChecked());
|
geocoding->setParseDiveWithoutGps(ui->parse_without_gps->isChecked());
|
||||||
s.setValue("parse_dives_without_gps", ui->parse_without_gps->isChecked());
|
geocoding->setTagExistingDives(ui->tag_existing_dives->isChecked());
|
||||||
s.setValue("tag_existing_dives", ui->tag_existing_dives->isChecked());
|
geocoding->setFirstTaxonomyCategory((taxonomy_category) ui->first_item->currentIndex());
|
||||||
s.setValue("cat0", ui->first_item->currentIndex());
|
geocoding->setSecondTaxonomyCategory((taxonomy_category) ui->second_item->currentIndex());
|
||||||
s.setValue("cat1", ui->second_item->currentIndex());
|
geocoding->setThirdTaxonomyCategory((taxonomy_category) ui->third_item->currentIndex());
|
||||||
s.setValue("cat2", ui->third_item->currentIndex());
|
|
||||||
s.endGroup();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue