reapack

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

commit 71de9d5e8b21a4f22f3d0d16b841479380e9e70b
parent dbcb8145387f78fb079bfbbb5d529d14d265eb8a
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Mon, 25 Jan 2016 23:03:36 -0500

reenable existing and identical remotes on import

Diffstat:
Msrc/reapack.cpp | 29++++++++++++-----------------
Msrc/reapack.hpp | 1-
2 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/src/reapack.cpp b/src/reapack.cpp @@ -110,14 +110,6 @@ void ReaPack::synchronizeAll() t->synchronize(remote); } -void ReaPack::synchronize(const Remote &remote) -{ - hitchhikeTransaction(); - - // hitchhike currently running transactions - m_transaction->synchronize(remote); -} - void ReaPack::enable(Remote remote) { remote.setEnabled(true); @@ -189,7 +181,16 @@ void ReaPack::importRemote() return; } - else if(existing.url() == remote.url()) { + else if(existing.url() != remote.url()) { + const int button = ShowMessageBox( + "This remote is already configured.\r\n" + "Do you want to overwrite the current remote?" + , title, MB_YESNO); + + if(button != IDYES) + return; + } + else if(existing.isEnabled()) { ShowMessageBox( "This remote is already configured.\r\n" "Nothing to do!" @@ -198,16 +199,10 @@ void ReaPack::importRemote() return; } - const int button = ShowMessageBox( - "This remote is already configured.\r\n" - "Do you want to overwrite the current remote?" - , title, MB_YESNO); - - if(button != IDYES) - return; } - synchronize(remote); + if(hitchhikeTransaction()) + m_transaction->synchronize(remote); if(!m_transaction) return; diff --git a/src/reapack.hpp b/src/reapack.hpp @@ -46,7 +46,6 @@ public: bool execActions(const int id, const int); void synchronizeAll(); - void synchronize(const Remote &); void enable(Remote); void disable(Remote); void uninstall(const Remote &);