Skip to content

Commit 08f2e84

Browse files
committedMar 15, 2013
[sextante] changed how recent algs group is updated
1 parent 55289e1 commit 08f2e84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/plugins/sextante/gui/SextanteToolbox.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def executeAlgorithm(self):
134134
if dlg.executed:
135135
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
136136
if showRecent:
137-
self.addRecentAlgorithms()
137+
self.addRecentAlgorithms(True)
138138
if isinstance(item, TreeActionItem):
139139
action = item.action
140140
action.setData(self)
@@ -147,13 +147,13 @@ def fillTree(self):
147147
else:
148148
self.fillTreeUsingProviders()
149149
self.algorithmTree.sortItems(0, Qt.AscendingOrder)
150-
self.addRecentAlgorithms()
150+
self.addRecentAlgorithms(False)
151151

152-
def addRecentAlgorithms(self):
152+
def addRecentAlgorithms(self, updating):
153153
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
154154
if showRecent:
155155
first = self.algorithmTree.topLevelItem(0)
156-
if first != None and first.text(0) == "Recently used algorithms":
156+
if updating:
157157
self.algorithmTree.removeItemWidget(first, 0)
158158
recent = SextanteLog.getRecentAlgorithms()
159159
if len(recent) != 0:

0 commit comments

Comments
 (0)
Please sign in to comment.