From bc25884ffbfc3eeba047fe49c0560083deee8ad8 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Mon, 12 Aug 2019 18:10:42 +0200 Subject: Make 'gui-text' required for visible parameters We were actually crashing for visible parameters without 'gui-text' otherwise. Also make sure we actually *do* bail out if we have parameters missing required fields and throw/catch an exception instead of producing broken instances. --- src/extension/prefdialog/parameter-optiongroup.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/extension/prefdialog/parameter-optiongroup.cpp') diff --git a/src/extension/prefdialog/parameter-optiongroup.cpp b/src/extension/prefdialog/parameter-optiongroup.cpp index a1b3e0a52..e3f655dde 100644 --- a/src/extension/prefdialog/parameter-optiongroup.cpp +++ b/src/extension/prefdialog/parameter-optiongroup.cpp @@ -45,6 +45,7 @@ ParamOptionGroup::ParamOptionGroup(Inkscape::XML::Node *xml, Inkscape::Extension !strcmp(chname, INKSCAPE_EXTENSION_NS "item") || !strcmp(chname, INKSCAPE_EXTENSION_NS "_item")) ) { child_repr->setAttribute("name", "option"); // TODO: hack to allow options to be parameters + child_repr->setAttribute("gui-text", "option"); // TODO: hack to allow options to be parameters ParamOptionGroupOption *param = new ParamOptionGroupOption(child_repr, ext, this); choices.push_back(param); } else if (child_repr->type() == XML::ELEMENT_NODE) { -- cgit v1.2.3