Commits

Yuya Nishihara committed 0a720e3

patch for url selection

Comments (0)

Files changed (2)

 wb-synchandler.diff
 wb-urlcombo-tuple.diff
 wb-synchandler-url.diff
+sync-urlaftersave.diff
 thread-dup-repoerror.diff
 close-self-by-wb.diff
 wb-closedestroy-trace.diff

sync-urlaftersave.diff

+# HG changeset patch
+# Date 1366474635 -32400
+# Parent 0bb167492e3ad0998c2f0c698d278fc2e5ebc5fa
+sync: restore current row after save/edit url
+
+reload() will recreate the paths model, so it need to restore the current
+alias and url.
+
+diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
+--- a/tortoisehg/hgqt/sync.py
++++ b/tortoisehg/hgqt/sync.py
+@@ -496,9 +496,8 @@ class SyncWidget(QWidget, qtlib.TaskWidg
+         dlg.setWindowFlags(Qt.Sheet)
+         dlg.setWindowModality(Qt.WindowModal)
+         if dlg.exec_() == QDialog.Accepted:
+-            self.curalias = hglib.fromunicode(dlg.aliasentry.text())
+-            self.setEditUrl(dlg.urlentry.text())
+             self.reload()
++            self.setUrl(dlg.aliasentry.text())
+ 
+     def removeurl(self):
+         if qtlib.QuestionMsgBox(_('Confirm path delete'),
+@@ -542,8 +541,8 @@ class SyncWidget(QWidget, qtlib.TaskWidg
+         dlg.setWindowFlags(Qt.Sheet)
+         dlg.setWindowModality(Qt.WindowModal)
+         if dlg.exec_() == QDialog.Accepted:
+-            self.curalias = hglib.fromunicode(dlg.aliasentry.text())
+             self.reload()
++            self.setUrl(dlg.aliasentry.text())
+ 
+     def secureclicked(self):
+         dlg = SecureDialog(self.repo, self.currentUrl(), self)