Skip to content

Commit

Permalink
[sextante] fixed #7251
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Mar 6, 2013
1 parent c0b07c1 commit cd2be4b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions python/plugins/sextante/gui/SextanteToolbox.py
Expand Up @@ -36,7 +36,6 @@
from sextante.gui.ParametersDialog import ParametersDialog
from sextante.gui.BatchProcessingDialog import BatchProcessingDialog
from sextante.gui.EditRenderingStylesDialog import EditRenderingStylesDialog

from sextante.ui.ui_SextanteToolbox import Ui_SextanteToolbox

try:
Expand Down Expand Up @@ -135,7 +134,7 @@ def executeAlgorithm(self):
if dlg.executed:
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
if showRecent:
self.fillTree()
self.addRecentAlgorithms()
if isinstance(item, TreeActionItem):
action = item.action
action.setData(self)
Expand All @@ -147,11 +146,15 @@ def fillTree(self):
self.fillTreeUsingCategories()
else:
self.fillTreeUsingProviders()

self.algorithmTree.sortItems(0, Qt.AscendingOrder)

self.algorithmTree.sortItems(0, Qt.AscendingOrder)
self.addRecentAlgorithms()

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

0 comments on commit cd2be4b

Please sign in to comment.