Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

changeset 2570
a2de94bae41b
parent 2569
0fff8dc5d472
child 2581
a3498dcc75cc
equal deleted inserted replaced
2569:0fff8dc5d472 2570:a2de94bae41b
904 self.__filterLogsEnabled = True 904 self.__filterLogsEnabled = True
905 self.__filterLogs() 905 self.__filterLogs()
906 906
907 self.__updateDiffButtons() 907 self.__updateDiffButtons()
908 self.__updatePhaseButton() 908 self.__updatePhaseButton()
909 self.__updateGraftButton()
909 910
910 def __readStdout(self): 911 def __readStdout(self):
911 """ 912 """
912 Private slot to handle the readyReadStandardOutput signal. 913 Private slot to handle the readyReadStandardOutput signal.
913 914
1032 def __updateGraftButton(self): 1033 def __updateGraftButton(self):
1033 """ 1034 """
1034 Private slot to update the status of the graft button. 1035 Private slot to update the status of the graft button.
1035 """ 1036 """
1036 if self.graftButton.isVisible(): 1037 if self.graftButton.isVisible():
1037 # step 1: count selected entries not belonging to the current branch 1038 if self.initialCommandMode == "log":
1038 otherBranches = 0 1039 # step 1: count selected entries not belonging to the current branch
1039 for itm in self.logTree.selectedItems(): 1040 otherBranches = 0
1040 branch = itm.text(self.BranchColumn) 1041 for itm in self.logTree.selectedItems():
1041 if branch != self.__projectBranch: 1042 branch = itm.text(self.BranchColumn)
1042 otherBranches += 1 1043 if branch != self.__projectBranch:
1043 1044 otherBranches += 1
1044 # step 2: set the status of the graft button 1045
1045 self.graftButton.setEnabled(otherBranches > 0) 1046 # step 2: set the status of the graft button
1047 self.graftButton.setEnabled(otherBranches > 0)
1048 else:
1049 self.graftButton.setEnabled(False)
1046 1050
1047 def __updateGui(self, itm): 1051 def __updateGui(self, itm):
1048 """ 1052 """
1049 Private slot to update GUI elements except the diff and phase buttons. 1053 Private slot to update GUI elements except the diff and phase buttons.
1050 1054

eric ide

mercurial