diff src/mainwindow.cpp @ 553:9c8147c9f245

Fix #354, Remote repo URL should be cleared when starting a new local project
author Chris Cannam
date Fri, 17 Feb 2012 10:58:41 +0000
parents 7663c1c19d47
children 930462068dcc
line wrap: on
line diff
--- a/src/mainwindow.cpp	Thu Feb 16 14:30:46 2012 +0000
+++ b/src/mainwindow.cpp	Fri Feb 17 10:58:41 2012 +0000
@@ -282,6 +282,8 @@
         path = s.value("default").toString();
     }
 
+    std::cerr << "hgQueryPaths: setting m_remoteRepoPath to " << m_remoteRepoPath << " from file " << hgrc.absoluteFilePath() << std::endl;
+    
     m_remoteRepoPath = path;
 
     // We have to do this here, because commandCompleted won't be called
@@ -1484,7 +1486,8 @@
     d->addChoice("remote",
                  tr("<qt><center><img src=\":images/browser-64.png\"><br>Remote repository</center></qt>"),
                  explanation,
-                 MultiChoiceDialog::UrlArg);
+                 MultiChoiceDialog::UrlArg,
+                 true); // default empty
 
     if (d->exec() == QDialog::Accepted) {
 
@@ -3083,10 +3086,8 @@
 
     QSettings settings;
 
-    m_remoteRepoPath = settings.value("remoterepopath", "").toString();
     m_workFolderPath = settings.value("workfolderpath", "").toString();
-    if (!workFolder.exists(m_workFolderPath))
-    {
+    if (!workFolder.exists(m_workFolderPath)) {
         m_workFolderPath = "";
     }