diff -r 7679d1d3671a -r a5d5e757efcf Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py --- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Jan 28 14:22:00 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Jan 28 16:02:52 2017 +0100 @@ -186,6 +186,21 @@ self.detailsEdit.anchorClicked.connect(self.__revisionClicked) self.__initActionsMenu() + + self.__finishCallbacks = [] + + def __addFinishCallback(self, callback): + """ + Private method to add a method to be called once the process finished. + + The callback methods are invoke in a FIFO style and are consumed. If + a callback method needs to be called again, it must be added again. + + @param callback callback method + @type function + """ + if callback not in self.__finishCallbacks: + self.__finishCallbacks.append(callback) def __initActionsMenu(self): """ @@ -980,6 +995,9 @@ self.inputGroup.setEnabled(False) self.inputGroup.hide() self.refreshButton.setEnabled(True) + + while self.__finishCallbacks: + self.__finishCallbacks.pop(0)() def __modifyForLargeFiles(self, filename): """ @@ -1436,8 +1454,8 @@ self.logTree.setCurrentItem(itm) else: # load the next bunch and try again + self.__addFinishCallback(self.on_downButton_clicked) self.on_nextButton_clicked() - self.on_downButton_clicked() @pyqtSlot() def on_nextButton_clicked(self):