Skip to content


[processing] Fix incorrect columns hidden when toggling advanced para…
Browse files Browse the repository at this point in the history
…ms in batch mode
  • Loading branch information
nyalldawson committed Apr 30, 2019
1 parent 1d80fe8 commit 070de69
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/processing/gui/
Expand Up @@ -312,6 +312,7 @@ def processingContext(self):
self.context_generator = ContextGenerator(self.processing_context)

self.column_to_parameter_definition = {}
self.parameter_to_column = {}


Expand Down Expand Up @@ -340,13 +341,15 @@ def initWidgets(self):
self.tblParameters.setColumnHidden(column, True)

self.column_to_parameter_definition[column] =
self.parameter_to_column[] = column
column += 1

for out in self.alg.destinationParameterDefinitions():
if not out.flags() & QgsProcessingParameterDefinition.FlagHidden:
column, QTableWidgetItem(out.description()))
self.column_to_parameter_definition[column] =
self.parameter_to_column[] = column
column += 1

Expand Down Expand Up @@ -558,9 +561,9 @@ def removeRows(self):

def toggleAdvancedMode(self, checked):
for column, param in enumerate(self.alg.parameterDefinitions()):
for param in self.alg.parameterDefinitions():
if param.flags() & QgsProcessingParameterDefinition.FlagAdvanced:
self.tblParameters.setColumnHidden(column, not checked)
self.tblParameters.setColumnHidden(self.parameter_to_column[], not checked)

def parametersForRow(self, row, destinationProject=None, warnOnInvalid=True):
Expand Down

1 comment on commit 070de69

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nyalldawson

This fix needs to be backported to 3.4 and 3.6, as reported here:

Thank you very much!

Please sign in to comment.