summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 6437b9d1..4d93f3b2 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -124,7 +124,7 @@ MainWindow::~MainWindow()
if (tray)
tray->hide();
stopTracker();
- _save();
+ maybe_save();
}
void MainWindow::set_working_directory()
@@ -142,6 +142,15 @@ void MainWindow::save()
save_timer.start(5000);
}
+void MainWindow::maybe_save()
+{
+ if (save_timer.isActive())
+ {
+ save_timer.stop();
+ _save();
+ }
+}
+
void MainWindow::_save() {
s.b->save();
save_mappings();
@@ -307,6 +316,8 @@ void MainWindow::stopTracker( ) {
if (pFilterDialog)
pFilterDialog->unregister_filter();
+ maybe_save();
+
work = nullptr;
libs = SelectedLibraries();