Skip to content

Commit

Permalink
[provided] avoid removing toolbox entries when there are no recent algs
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Mar 2, 2017
1 parent b500ab5 commit 1618f53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/plugins/processing/gui/ProcessingToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ def addRecentAlgorithms(self, updating):
found = False
if updating:
recentItem = self.algorithmTree.topLevelItem(0)
treeWidget = recentItem.treeWidget()
treeWidget.takeTopLevelItem(
treeWidget.indexOfTopLevelItem(recentItem))
if recentItem.text(0) == self.tr('Recently used algorithms'):
treeWidget = recentItem.treeWidget()
treeWidget.takeTopLevelItem(
treeWidget.indexOfTopLevelItem(recentItem))

recentItem = QTreeWidgetItem()
recentItem.setText(0, self.tr('Recently used algorithms'))
Expand Down

0 comments on commit 1618f53

Please sign in to comment.