summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-30 08:46:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-30 08:49:36 +0200
commitbe000a8a9aad1d6804ee27b02b12b531029427cb (patch)
tree6eabc3b997a8bec4763e0d30d0f4b91eb78aa21d
parent22bde7a4fd6eb48cdcdde61d86ca193abd054699 (diff)
ui: save current tracker/filter/proto, not last
Current tracker/filter/proto name depends on the currentTextChanged() slot. currentIndexChanged() runs before currentText() is updated, causing the old name to be saved.
-rw-r--r--facetracknoir/ui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index a600543c..7b84de72 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -58,16 +58,16 @@ MainWindow::MainWindow() :
tie_setting(s.filter_dll, ui.iconcomboFilter);
connect(ui.iconcomboTrackerSource,
- static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
- [&](int) -> void { if (pTrackerDialog) pTrackerDialog = nullptr; save(); });
+ &QComboBox::currentTextChanged,
+ [&](QString) -> void { if (pTrackerDialog) pTrackerDialog = nullptr; save(); });
connect(ui.iconcomboProtocol,
- static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
- [&](int) -> void { if (pProtocolDialog) pProtocolDialog = nullptr; save(); });
+ &QComboBox::currentTextChanged,
+ [&](QString) -> void { if (pProtocolDialog) pProtocolDialog = nullptr; save(); });
connect(ui.iconcomboFilter,
- static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
- [&](int) -> void { if (pFilterDialog) pFilterDialog = nullptr; save(); });
+ &QComboBox::currentTextChanged,
+ [&](QString) -> void { if (pFilterDialog) pFilterDialog = nullptr; save(); });
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));