From e5601e5e84df30c40d93271fd69cecd31391e309 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sat, 29 Apr 2017 02:01:22 +0200 Subject: Rewrite UX (bzr r15620.1.12) --- src/ui/dialog/livepatheffect-editor.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/ui/dialog/livepatheffect-editor.cpp') diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index e5becdb5c..455c12bc3 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -19,7 +19,7 @@ #include "livepatheffect-editor.h" #include "desktop.h" - +#include #include "document.h" #include "document-undo.h" #include "helper/action.h" @@ -193,8 +193,14 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect) if ( ! effect.upd_params ) { return; } - + bool expanderopen = false; if (effectwidget) { + Gtk::Expander * expander = NULL; + std::vector childs = dynamic_cast (effectwidget)->get_children(); + std::vector childs_default = dynamic_cast (childs[childs.size()-1])->get_children(); + if ((expander = dynamic_cast(childs_default[childs_default.size()-1]))){ + expanderopen = expander->get_expanded(); + } effectcontrol_vbox.remove(*effectwidget); delete effectwidget; effectwidget = NULL; @@ -204,6 +210,15 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect) effectwidget = effect.newWidget(); if (effectwidget) { + Gtk::Widget * defaultswidget = effect.defaultParamSet(); + if (defaultswidget) { + Gtk::Expander * expander = NULL; + std::vector childs_default = dynamic_cast (defaultswidget)->get_children(); + if ((expander = dynamic_cast(childs_default[childs_default.size()-1]))){ + expander->set_expanded(expanderopen); + } + dynamic_cast (effectwidget)->pack_start(*defaultswidget, true, true); + } effectcontrol_vbox.pack_start(*effectwidget, true, true); } button_remove.show(); -- cgit v1.2.3