Fixed an issue in the Mercurial log browser setting the correct state of the graft button in 'incoming' and 'outgoing' mode.

Sat, 13 Apr 2013 13:10:43 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 13 Apr 2013 13:10:43 +0200
changeset 2570
a2de94bae41b
parent 2569
0fff8dc5d472
child 2576
b984efd69f15

Fixed an issue in the Mercurial log browser setting the correct state of the graft button in 'incoming' and 'outgoing' mode.

Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Apr 13 13:06:39 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Apr 13 13:10:43 2013 +0200
@@ -906,6 +906,7 @@
         
         self.__updateDiffButtons()
         self.__updatePhaseButton()
+        self.__updateGraftButton()
     
     def __readStdout(self):
         """
@@ -1034,15 +1035,18 @@
         Private slot to update the status of the graft button.
         """
         if self.graftButton.isVisible():
-            # step 1: count selected entries not belonging to the current branch
-            otherBranches = 0
-            for itm in self.logTree.selectedItems():
-                branch = itm.text(self.BranchColumn)
-                if branch != self.__projectBranch:
-                    otherBranches += 1
-            
-            # step 2: set the status of the graft button
-            self.graftButton.setEnabled(otherBranches > 0)
+            if self.initialCommandMode == "log":
+                # step 1: count selected entries not belonging to the current branch
+                otherBranches = 0
+                for itm in self.logTree.selectedItems():
+                    branch = itm.text(self.BranchColumn)
+                    if branch != self.__projectBranch:
+                        otherBranches += 1
+                
+                # step 2: set the status of the graft button
+                self.graftButton.setEnabled(otherBranches > 0)
+            else:
+                self.graftButton.setEnabled(False)
     
     def __updateGui(self, itm):
         """

eric ide

mercurial