Skip to content
Permalink
Browse files

[processing] Fix incorrect columns hidden when toggling advanced para…

…ms in batch mode
  • Loading branch information
nyalldawson committed Apr 30, 2019
1 parent 1d80fe8 commit 070de69e30d564a4a8b527a58ef0bc4543cbb4bc
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/processing/gui/BatchPanel.py
@@ -312,6 +312,7 @@ def processingContext(self):
self.context_generator = ContextGenerator(self.processing_context)

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

self.initWidgets()

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

self.column_to_parameter_definition[column] = param.name()
self.parameter_to_column[param.name()] = column
column += 1

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

self.addFillRow()
@@ -558,9 +561,9 @@ def removeRows(self):
self.tblParameters.removeRow(row)

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[param.name()], not checked)

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

1 comment on commit 070de69

@PedroVenancio

This comment has been minimized.

Copy link
Contributor

@PedroVenancio PedroVenancio commented on 070de69 May 24, 2019

Hi @nyalldawson

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

https://issues.qgis.org/issues/22087

Thank you very much!

Please sign in to comment.
You can’t perform that action at this time.