Skip to content

Commit 37cc8fc

Browse files
committedJul 3, 2017
Don't allow removal of model parameters on which other parameters
depend
1 parent 921939e commit 37cc8fc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎python/plugins/processing/modeler/ModelerGraphicItem.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,12 @@ def updateAlgorithm(self, alg):
229229
def removeElement(self):
230230
if isinstance(self.element, QgsProcessingModelAlgorithm.ModelParameter):
231231
if self.model.childAlgorithmsDependOnParameter(self.element.parameterName()):
232-
QMessageBox.warning(None, 'Could not remove element',
233-
'Other elements depend on the selected one.\n'
232+
QMessageBox.warning(None, 'Could not remove input',
233+
'Algorithms depend on the selected input.\n'
234+
'Remove them before trying to remove it.')
235+
elif self.model.otherParametersDependOnParameter(self.element.parameterName()):
236+
QMessageBox.warning(None, 'Could not remove input',
237+
'Other inputs depend on the selected input.\n'
234238
'Remove them before trying to remove it.')
235239
else:
236240
self.model.removeModelParameter(self.element.parameterName())

0 commit comments

Comments
 (0)
Please sign in to comment.