commit 05d32f06437f2dddbbc982c80e7cc702e54ece20
parent 98030aabd6b93a20d0fcffc56b7137d5aaff023c
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sun, 3 Dec 2017 10:26:16 -0800
manager: use a single timer for refreshing the about dialog
Previously it could start multiple timers when receiving consecutive list selection change events.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/manager.cpp b/src/manager.cpp
@@ -47,6 +47,8 @@ enum {
ACTION_EXPORT_ARCHIVE,
};
+enum { TIMER_ABOUT = 1, };
+
Manager::Manager()
: Dialog(IDD_CONFIG_DIALOG),
m_list(nullptr), m_changes(0), m_importing(false)
@@ -70,7 +72,7 @@ void Manager::onInit()
});
m_list->enableIcons();
- m_list->onSelect(bind(&Dialog::startTimer, this, 100, 0, true));
+ m_list->onSelect(bind(&Dialog::startTimer, this, 100, TIMER_ABOUT, true));
m_list->onIconClick(bind(&Manager::toggleEnabled, this));
m_list->onActivate(bind(&Manager::aboutRepo, this, true));
m_list->onContextMenu(bind(&Manager::fillContextMenu, this, _1, _2));