From: johanengelen Date: Sun, 20 Jan 2008 05:11:53 +0000 (+0000) Subject: don't update LPE dialog when selection is modified. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fdad0bc3aa765bdc61fe39e8c4da03f717525dcc;p=inkscape.git don't update LPE dialog when selection is modified. --- diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index 93e17c324..3956f0140 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -65,7 +65,8 @@ LivePathEffectEditor::LivePathEffectEditor() explain_label("", Gtk::ALIGN_CENTER), effectapplication_frame(_("Apply new effect")), effectcontrol_frame(_("Current effect")), - current_desktop(NULL) + current_desktop(NULL), + currect_effect(NULL) { Gtk::Box *contents = _getContents(); contents->set_spacing(4); @@ -110,21 +111,25 @@ LivePathEffectEditor::~LivePathEffectEditor() void LivePathEffectEditor::showParams(LivePathEffect::Effect* effect) { - if (effectwidget) { - effectcontrol_vbox.remove(*effectwidget); - delete effectwidget; - effectwidget = NULL; - } + if (currect_effect != effect) { + currect_effect = effect; - explain_label.set_markup("" + effect->getName() + ""); - effectwidget = effect->newWidget(&tooltips); - if (effectwidget) { - effectcontrol_vbox.pack_start(*effectwidget, true, true); - } - button_remove.show(); + if (effectwidget) { + effectcontrol_vbox.remove(*effectwidget); + delete effectwidget; + effectwidget = NULL; + } - effectcontrol_vbox.show_all_children(); - // fixme: do resizing of dialog + explain_label.set_markup("" + effect->getName() + ""); + effectwidget = effect->newWidget(&tooltips); + if (effectwidget) { + effectcontrol_vbox.pack_start(*effectwidget, true, true); + } + button_remove.show(); + + effectcontrol_vbox.show_all_children(); + // fixme: add resizing of dialog + } } void diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h index dc852dd7f..4f635ad51 100644 --- a/src/ui/dialog/livepatheffect-editor.h +++ b/src/ui/dialog/livepatheffect-editor.h @@ -65,6 +65,8 @@ private: SPDesktop * current_desktop; + LivePathEffect::Effect* currect_effect; + LivePathEffectEditor(LivePathEffectEditor const &d); LivePathEffectEditor& operator=(LivePathEffectEditor const &d); };