Skip to content

Commit

Permalink
[processing] Fix gdal algorithms immediately show wrong or missing
Browse files Browse the repository at this point in the history
parameter value warnings

Fixes qgis#46532
  • Loading branch information
nyalldawson committed Dec 20, 2021
1 parent 8dc8331 commit 5ca4af9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
Expand Up @@ -120,7 +120,10 @@ def parametersHaveChanged(self):
context = createContext()
feedback = QgsProcessingFeedback()
try:
parameters = self.dialog.createProcessingParameters()
# messy as all heck, but we don't want to call the dialog's implementation of
# createProcessingParameters as we want to catch the exceptions raised by the
# parameter panel instead...
parameters = {} if self.dialog.mainWidget() is None else self.dialog.mainWidget().createProcessingParameters()
for output in self.algorithm().destinationParameterDefinitions():
if not output.name() in parameters or parameters[output.name()] is None:
if not output.flags() & QgsProcessingParameterDefinition.FlagOptional:
Expand Down

0 comments on commit 5ca4af9

Please sign in to comment.