Skip to content

Commit 4a560bb

Browse files
committed
Fixed problem with duplicated recent algorithms tree.
Also fixed blocking typo in modeler code, introduced in last commit, and two minor changes in saga
1 parent a0e9f89 commit 4a560bb

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

python/plugins/sextante/gui/SextanteToolbox.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,16 @@ def fillTree(self):
151151

152152
def addRecentAlgorithms(self, updating):
153153
showRecent = SextanteConfig.getSetting(SextanteConfig.SHOW_RECENT_ALGORITHMS)
154-
if showRecent:
155-
first = self.algorithmTree.topLevelItem(0)
156-
if updating:
157-
self.algorithmTree.removeItemWidget(first, 0)
154+
if showRecent:
158155
recent = SextanteLog.getRecentAlgorithms()
159156
if len(recent) != 0:
160157
found = False
158+
if updating:
159+
recentItem = self.algorithmTree.topLevelItem(0)
160+
treeWidget = recentItem.treeWidget()
161+
treeWidget.takeTopLevelItem(treeWidget.indexOfTopLevelItem(recentItem))
162+
#self.algorithmTree.removeItemWidget(first, 0)
163+
161164
recentItem = QTreeWidgetItem()
162165
recentItem.setText(0, self.tr("Recently used algorithms"))
163166
for algname in recent:
@@ -166,13 +169,12 @@ def addRecentAlgorithms(self, updating):
166169
algItem = TreeAlgorithmItem(alg)
167170
recentItem.addChild(algItem)
168171
found = True
169-
if found:
172+
if found:
170173
self.algorithmTree.insertTopLevelItem(0, recentItem)
171174
recentItem.setExpanded(True)
172175

173176
self.algorithmTree.setWordWrap(True)
174177

175-
176178
def fillTreeUsingCategories(self):
177179
providersToExclude = ["model", "script"]
178180
self.algorithmTree.clear()

python/plugins/sextante/modeler/ModelerAlgorithm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def getCopy(self):
5959
newone = ModelerAlgorithm()
6060
newone.openModel(self.descriptionFile)
6161
newone.provider = self.provider
62-
newone.deactivated = self.deactivate
62+
newone.deactivated = self.deactivated
6363
return newone
6464

6565
def __init__(self):

python/plugins/sextante/saga/SagaAlgorithmProvider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def getPostProcessingErrorMessage(self, wrongLayers):
9898
html += ("<p>This algorithm requires SAGA to be run. A test to check if SAGA is correctly installed "
9999
"and configured in your system has been performed, with the following result:</p><ul><i>")
100100
if msg is None:
101-
html += "Saga seems to be correctly installed and configured</li></ul>"
101+
html += "SAGA seems to be correctly installed and configured</li></ul>"
102102
else:
103103
html += msg + "</i></li></ul>"
104104
html += '<p><a href= "http://docs.qgis.org/html/en/docs/user_manual/sextante/3rdParty.html">Click here</a> to know more about how to install and configure SAGA to be used with SEXTANTE</p>'

python/plugins/sextante/saga/SagaUtils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ def checkSagaIsInstalled(ignoreRegistrySettings=False):
142142
s = traceback.format_exc()
143143
return "Error while checking SAGA installation. SAGA might not be correctly configured.\n" + s;
144144

145-
settings.setValue("/SextanteQGIS/SagaInstalled", True)
145+
settings.setValue(SAGA_INSTALLED, True)

0 commit comments

Comments
 (0)