Skip to content
Browse files
Merge pull request #1965 from radosuav/processing_models
[Processing]  Improve the robustness of models...
  • Loading branch information
volaya committed May 6, 2015
2 parents 79c0d5b + d1985b3 commit 6fbb2d6c260ba19695d064506a9d54f2825109a2
@@ -35,6 +35,8 @@
from PyQt4.QtCore import QCoreApplication, QPointF
from PyQt4.QtGui import QIcon
from qgis.core import QgsRasterLayer, QgsVectorLayer
from qgis.gui import QgsMessageBar
from qgis.utils import iface
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.modeler.WrongModelException import WrongModelException
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
@@ -332,7 +334,13 @@ def prepareAlgorithm(self, alg):
algInstance = alg.algorithm
for param in algInstance.parameters:
if not param.hidden:
value = self.resolveValue(alg.params[])
if in alg.params:
value = self.resolveValue(alg.params[])
iface.messageBar().pushMessage("Warning"),"Parameter %s in algorithm %s in the model is run with default value! Edit the model to make sure that this is correct." % (,,
QgsMessageBar.WARNING, 4)
value = None
if value is None and isinstance(param, ParameterExtent):
value = self.getMinCoveringExtent()
# We allow unexistent filepaths, since that allows
@@ -410,7 +410,10 @@ def setPreviousValues(self):
if param.hidden:
widget = self.valueItems[]
value = alg.params[]
if in alg.params:
value = alg.params[]
value = None
if isinstance(param, (
@@ -98,7 +98,10 @@ def paintModel(self, model):
idx = 0
for parameter in alg.algorithm.parameters:
if not parameter.hidden:
value = alg.params[]
if in alg.params:
value = alg.params[]
value = None
sourceItems = self.getItemsFromParamValue(value)
for sourceItem, sourceIdx in sourceItems:
arrow = ModelerArrowItem(sourceItem, sourceIdx, self.algItems[], idx)

0 comments on commit 6fbb2d6

Please sign in to comment.