Adapt OTB widget use of non-stable API

(this is a prime example of why the sooner we can drop all this python, the better...)
This commit is contained in:
Nyall Dawson 2020-03-31 19:43:39 +10:00
parent ed51791068
commit bc659fe1fa
2 changed files with 4 additions and 6 deletions

View File

@ -70,10 +70,10 @@ class OtbChoiceWidgetWrapper(WidgetWrapper):
#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

View File

@ -486,8 +486,6 @@ class ModelerParametersWidget(QWidget):
self.widget = ModelerParametersPanelWidget(alg, model, algName, configuration, dialog, context)
self.widget_labels = {}
class ContextGenerator(QgsProcessingContextGenerator):
def __init__(self, context):