Code

don't update LPE dialog when selection is modified.
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 20 Jan 2008 05:11:53 +0000 (05:11 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 20 Jan 2008 05:11:53 +0000 (05:11 +0000)
src/ui/dialog/livepatheffect-editor.cpp
src/ui/dialog/livepatheffect-editor.h

index 93e17c324c59feb2426384b1e26701f99120dcee..3956f014087c623d8e3394067a5acdbe97b2a7aa 100644 (file)
@@ -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("<b>" + effect->getName() + "</b>");
-    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("<b>" + effect->getName() + "</b>");
+        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
index dc852dd7f791f0639f6e01c37cd8162e08258de2..4f635ad51e3858d94c3b58c4fe0b33334b04eefa 100644 (file)
@@ -65,6 +65,8 @@ private:
 
     SPDesktop * current_desktop;
 
+    LivePathEffect::Effect* currect_effect;
+
     LivePathEffectEditor(LivePathEffectEditor const &d);
     LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
 };