Skip to content
Browse files
[processing] Fix exception on launching refactor fields
(The logic with parameter widget_wrapper metadata is very gross -
but there's nothing we can do about it till 4.0!)

Fixes #20707
  • Loading branch information
nyalldawson committed Dec 4, 2018
1 parent 0ba37fc commit 9c1653f00abe8394d6779421a1762b6e1bd159ea
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/processing/gui/
@@ -1772,8 +1772,11 @@ class WidgetWrapperFactory:

def create_wrapper(param, dialog, row=0, col=0):

if param.metadata().get('widget_wrapper', {}).get('class', None) is not None:
wrapper_metadata = param.metadata().get('widget_wrapper', None)
# VERY messy logic here to avoid breaking 3.0 API which allowed metadata "widget_wrapper" value to be either
# a string name of a class OR a dict.
# TODO QGIS 4.0 -- require widget_wrapper to be a dict.
if wrapper_metadata and (not isinstance(wrapper_metadata, dict) or wrapper_metadata.get('class', None) is not None):
return WidgetWrapperFactory.create_wrapper_from_metadata(param, dialog, row, col)
# try from c++ registry first

0 comments on commit 9c1653f

Please sign in to comment.