Skip to content

Commit

Permalink
[sextante] changed how recent algs group is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Mar 15, 2013
1 parent 55289e1 commit 08f2e84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/sextante/gui/SextanteToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def executeAlgorithm(self):
if dlg.executed:
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
if showRecent:
self.addRecentAlgorithms()
self.addRecentAlgorithms(True)
if isinstance(item, TreeActionItem):
action = item.action
action.setData(self)
Expand All @@ -147,13 +147,13 @@ def fillTree(self):
else:
self.fillTreeUsingProviders()
self.algorithmTree.sortItems(0, Qt.AscendingOrder)
self.addRecentAlgorithms()
self.addRecentAlgorithms(False)

def addRecentAlgorithms(self):
def addRecentAlgorithms(self, updating):
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
if showRecent:
first = self.algorithmTree.topLevelItem(0)
if first != None and first.text(0) == "Recently used algorithms":
if updating:
self.algorithmTree.removeItemWidget(first, 0)
recent = SextanteLog.getRecentAlgorithms()
if len(recent) != 0:
Expand Down

0 comments on commit 08f2e84

Please sign in to comment.