changeset 565:c2e212ab0068

Make it possible to set an empty remote URL, fixing #357
author Chris Cannam
date Wed, 29 Feb 2012 10:38:28 +0000
parents 39cac58b4f92
children 1e76d1009167
files src/mainwindow.cpp src/multichoicedialog.cpp
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/mainwindow.cpp	Tue Feb 28 16:59:25 2012 +0000
+++ b/src/mainwindow.cpp	Wed Feb 29 10:38:28 2012 +0000
@@ -289,7 +289,7 @@
         path = s.value("default").toString();
     }
 
-    std::cerr << "hgQueryPaths: setting m_remoteRepoPath to " << m_remoteRepoPath << " from file " << hgrc.absoluteFilePath() << std::endl;
+//    std::cerr << "hgQueryPaths: setting m_remoteRepoPath to " << m_remoteRepoPath << " from file " << hgrc.absoluteFilePath() << std::endl;
     
     m_remoteRepoPath = path;
 
--- a/src/multichoicedialog.cpp	Tue Feb 28 16:59:25 2012 +0000
+++ b/src/multichoicedialog.cpp	Wed Feb 29 10:38:28 2012 +0000
@@ -265,7 +265,9 @@
 void
 MultiChoiceDialog::updateOkButton()
 {
-    if (m_argTypes[m_currentChoice] == UrlToDirectoryArg) {
+    if (m_defaultEmpty[m_currentChoice]) {
+        m_okButton->setEnabled(true);
+    } else if (m_argTypes[m_currentChoice] == UrlToDirectoryArg) {
         m_okButton->setEnabled(getArgument() != "" &&
                                getAdditionalArgument() != "");
     } else {