Skip to content

Commit

Permalink
Adapt OTB widget use of non-stable API
Browse files Browse the repository at this point in the history
(this is a prime example of why the sooner we can drop all this python, the better...)
  • Loading branch information
nyalldawson committed Mar 31, 2020
1 parent ed51791 commit bc659fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python/plugins/processing/algs/otb/OtbChoiceWidget.py
Expand Up @@ -70,10 +70,10 @@ def __updateWrapper(self, name, visible):

#Fur Qgis modeler
else:
if name in self.dialog.wrappers:
self.__setWrapperVisibility(self.dialog.wrappers[name], visible)
if name in self.dialog.widget_labels:
self.dialog.widget_labels[name].setVisible(visible)
if name in self.dialog.widget.widget.wrappers:
self.__setWrapperVisibility(self.dialog.widget.widget.wrappers[name], visible)
if name in self.dialog.widget.widget.widget_labels:
self.dialog.widget.widget.widget_labels[name].setVisible(visible)

def __setWrapperVisibility(self, wrapper, v):
# For compatibility with 3.x API, we need to check whether the wrapper is
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/processing/modeler/ModelerParametersDialog.py
Expand Up @@ -486,8 +486,6 @@ def __init__(self, alg, model, algName=None, configuration=None, dialog=None, co

self.widget = ModelerParametersPanelWidget(alg, model, algName, configuration, dialog, context)

self.widget_labels = {}

class ContextGenerator(QgsProcessingContextGenerator):

def __init__(self, context):
Expand Down

0 comments on commit bc659fe

Please sign in to comment.