Sat, 13 Apr 2013 12:38:48 +0200
Fixed a severe issue in the Mercurial log browser.
(grafted from a410f3ced3eaf18ae282ac9bb333617d12eabe85)
Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py | file | annotate | diff | comparison | revisions |
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Apr 06 16:38:56 2013 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Apr 13 12:38:48 2013 +0200 @@ -1097,7 +1097,10 @@ """ Private slot to handle the Diff to Parent 1 button. """ - itm = self.logTree.selectedItems()[0] + if len(self.logTree.selectedItems()): + itm = self.logTree.selectedItems()[0] + else: + itm = self.logTree.currentItem() if itm is None: self.diffP1Button.setEnabled(False) return @@ -1115,7 +1118,10 @@ """ Private slot to handle the Diff to Parent 2 button. """ - itm = self.logTree.selectedItems()[0] + if len(self.logTree.selectedItems()): + itm = self.logTree.selectedItems()[0] + else: + itm = self.logTree.currentItem() if itm is None: self.diffP2Button.setEnabled(False) return