reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 5fa1a0f64992a7abd95627edeb421aa6bbba5937
parent 72be5268b0d324ba9e412f2427b279969937c5dc
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Mon,  6 Jun 2016 20:04:10 -0700

manager: avoid opening the import dialog twice on windows

Diffstat:
Msrc/manager.cpp | 8+++++++-
Msrc/manager.hpp | 2++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/manager.cpp b/src/manager.cpp @@ -37,7 +37,8 @@ enum { ACTION_ENABLE = 80, ACTION_DISABLE, ACTION_UNINSTALL, ACTION_ABOUT, Manager::Manager(ReaPack *reapack) : Dialog(IDD_CONFIG_DIALOG), - m_reapack(reapack), m_config(reapack->config()), m_list(0), m_changes(0) + m_reapack(reapack), m_config(reapack->config()), m_list(0), + m_changes(0), m_importing(false) { } @@ -65,7 +66,12 @@ void Manager::onCommand(const int id, int) { switch(id) { case IDC_IMPORT: + if(m_importing) // avoid opening the import dialog twice on windows + break; + + m_importing = true; Dialog::Show<Import>(instance(), handle(), m_reapack); + m_importing = false; break; case IDC_BROWSE: launchBrowser(); diff --git a/src/manager.hpp b/src/manager.hpp @@ -66,7 +66,9 @@ private: ReaPack *m_reapack; Config *m_config; ListView *m_list; + size_t m_changes; + bool m_importing; std::map<Remote, bool> m_enableOverrides; std::set<Remote> m_uninstall;