diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2017-05-05 15:20:37 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2017-05-05 15:20:37 +0000 |
| commit | 9772b554c824cc7a6bc519672191f036f52a3054 (patch) | |
| tree | 561f8b478eded4d89477290ff6b8a4f4015c4807 /src/ui/dialog/livepatheffect-editor.cpp | |
| parent | Remove unwanted cout (diff) | |
| parent | Update to trunk (diff) | |
| download | inkscape-9772b554c824cc7a6bc519672191f036f52a3054.tar.gz inkscape-9772b554c824cc7a6bc519672191f036f52a3054.zip | |
merge lpeUpdDefaultParams
(bzr r15664)
Diffstat (limited to 'src/ui/dialog/livepatheffect-editor.cpp')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index e60ca77e6..bb9b61504 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 <gtkmm/expander.h> #include "document.h" #include "document-undo.h" #include "helper/action.h" @@ -200,7 +200,18 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect) lpe_changed = false; return; } + bool expanderopen = false; + Gtk::Widget * defaultswidget = effect.defaultParamSet(); + if (effectwidget) { + if (defaultswidget) { + Gtk::Expander * expander = NULL; + std::vector<Gtk::Widget *> childs = dynamic_cast<Gtk::Box *> (effectwidget)->get_children(); + std::vector<Gtk::Widget *> childs_default = dynamic_cast<Gtk::Box *> (childs[childs.size()-1])->get_children(); + if ((expander = dynamic_cast<Gtk::Expander *>(childs_default[childs_default.size()-1]))){ + expanderopen = expander->get_expanded(); + } + } effectcontrol_vbox.remove(*effectwidget); delete effectwidget; effectwidget = NULL; @@ -210,6 +221,15 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect) effectwidget = effect.newWidget(); if (effectwidget) { + + if (defaultswidget) { + Gtk::Expander * expander = NULL; + std::vector<Gtk::Widget *> childs_default = dynamic_cast<Gtk::Box *> (defaultswidget)->get_children(); + if ((expander = dynamic_cast<Gtk::Expander *>(childs_default[childs_default.size()-1]))){ + expander->set_expanded(expanderopen); + } + dynamic_cast<Gtk::Box *> (effectwidget)->pack_start(*defaultswidget, true, true); + } effectcontrol_vbox.pack_start(*effectwidget, true, true); } button_remove.show(); |
