commit e47e6d2ead57a7a739cc58dca530cdd74d74a4ff
parent 08a4241336d1a95e7c65a4affcdb50b2a8b8cb72
Author: cfillion <cfillion@users.noreply.github.com>
Date: Thu, 31 Dec 2015 20:30:46 -0500
ask to to overwrite a remote when importing
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/reapack.cpp b/src/reapack.cpp
@@ -142,14 +142,20 @@ void ReaPack::importRemote()
}
if(m_config->remotes().count({name})) {
- ShowMessageBox("This remote is already configured.", title, 0);
- return;
+ const int button = ShowMessageBox(
+ "Do you want to overwrite the current remote?",
+ "This remote is already configured", MB_YESNO);
+
+ if(button != IDYES)
+ return;
}
const Remote remote{name, url};
m_config->addRemote(remote);
m_config->write();
+ m_manager->refresh();
+
Transaction *t = createTransaction();
if(t)
t->fetch(remote);