mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-03 15:43:09 +00:00
Dive filter: reset filter on change of display_invalid_dives flag
The user had to restart the application or manually change the filter if they changed the flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ca336d13e5
commit
8585f0698c
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include "core/settings/qPrefDisplay.h"
|
#include "core/settings/qPrefDisplay.h"
|
||||||
#include "core/settings/qPrefCloudStorage.h"
|
#include "core/settings/qPrefCloudStorage.h"
|
||||||
#include "core/settings/qPrefDiveComputer.h"
|
#include "core/settings/qPrefDiveComputer.h"
|
||||||
|
#include "core/subsurface-qt/divelistnotifier.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
@ -85,8 +86,14 @@ void PreferencesLog::syncSettings()
|
||||||
else if (ui->cloudDefaultFile->isChecked())
|
else if (ui->cloudDefaultFile->isChecked())
|
||||||
log->set_default_file_behavior(CLOUD_DEFAULT_FILE);
|
log->set_default_file_behavior(CLOUD_DEFAULT_FILE);
|
||||||
|
|
||||||
|
bool displayinvalid_changed = ui->displayinvalid->isChecked() != prefs.display_invalid_dives;
|
||||||
|
|
||||||
qPrefLog::set_show_average_depth(ui->show_average_depth->isChecked());
|
qPrefLog::set_show_average_depth(ui->show_average_depth->isChecked());
|
||||||
qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
|
qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
|
||||||
qPrefLog::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
|
qPrefLog::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
|
||||||
qPrefLog::set_salinityEditDefault(ui->salinityEditDefault->isChecked());
|
qPrefLog::set_salinityEditDefault(ui->salinityEditDefault->isChecked());
|
||||||
|
|
||||||
|
// TODO: Move to preferences code?
|
||||||
|
if (displayinvalid_changed)
|
||||||
|
emit diveListNotifier.filterReset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue