1053 # step 2: set the status of the graft button |
1053 # step 2: set the status of the graft button |
1054 self.graftButton.setEnabled(otherBranches > 0) |
1054 self.graftButton.setEnabled(otherBranches > 0) |
1055 else: |
1055 else: |
1056 self.graftButton.setEnabled(False) |
1056 self.graftButton.setEnabled(False) |
1057 |
1057 |
1058 def __updateGraftButton(self): |
|
1059 """ |
|
1060 Private slot to update the status of the graft button. |
|
1061 """ |
|
1062 if self.graftButton.isVisible(): |
|
1063 # step 1: count selected entries not belonging to the current branch |
|
1064 otherBranches = 0 |
|
1065 for itm in self.logTree.selectedItems(): |
|
1066 branch = itm.text(self.BranchColumn) |
|
1067 if branch != self.__projectBranch: |
|
1068 otherBranches += 1 |
|
1069 |
|
1070 # step 2: set the status of the graft button |
|
1071 self.graftButton.setEnabled(otherBranches > 0) |
|
1072 |
|
1073 def __updateGui(self, itm): |
1058 def __updateGui(self, itm): |
1074 """ |
1059 """ |
1075 Private slot to update GUI elements except the diff and phase buttons. |
1060 Private slot to update GUI elements except the diff and phase buttons. |
1076 |
1061 |
1077 @param itm reference to the item the update should be based on (QTreeWidgetItem) |
1062 @param itm reference to the item the update should be based on (QTreeWidgetItem) |