Commits

Anonymous committed 3b20880

sync: ensure that URL is always updated when a new scheme is selected

  • Participants
  • Parent commits 2e73377
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/sync.py

         return not self.targetcheckbox.isChecked()
 
     def schemeChange(self):
-        if not self.default_user:
-            return
-
-        scheme = self._schemes[self.schemecombo.currentIndex()]
-        if scheme == 'ssh':
-            self.default_user = self.curuser
-            self.curuser = self.lastsshuser
-        else:
-            self.curuser = self.default_user
+        if self.default_user:
+            scheme = self._schemes[self.schemecombo.currentIndex()]
+            if scheme == 'ssh':
+                self.default_user = self.curuser
+                self.curuser = self.lastsshuser
+            else:
+                self.curuser = self.default_user
             
         self.refreshUrl()