Code

Remove 'Is visible?' checkbox from LPE editor because it duplicates functionality
authorcilix42 <cilix42@users.sourceforge.net>
Sun, 21 Jun 2009 19:36:30 +0000 (19:36 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Sun, 21 Jun 2009 19:36:30 +0000 (19:36 +0000)
src/live_effects/effect.cpp
src/live_effects/parameter/parameter.cpp
src/live_effects/parameter/parameter.h

index 316495eb4564bd32bae97e69df44bbf9e908d90a..de0535448c4ead1a5f6f842f4bd05139fad94955 100644 (file)
@@ -278,6 +278,7 @@ Effect::Effect(LivePathEffectObject *lpeobject)
       is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden
 {
     registerParameter( dynamic_cast<Parameter *>(&is_visible) );
+    is_visible.widget_is_visible = false;
 }
 
 Effect::~Effect()
@@ -550,13 +551,15 @@ Effect::newWidget(Gtk::Tooltips * tooltips)
 
     std::vector<Parameter *>::iterator it = param_vector.begin();
     while (it != param_vector.end()) {
-        Parameter * param = *it;
-        Gtk::Widget * widg = param->param_newWidget(tooltips);
-        Glib::ustring * tip = param->param_getTooltip();
-        if (widg) {
-           vbox->pack_start(*widg, true, true, 2);
-            if (tip != NULL) {
-                tooltips->set_tip(*widg, *tip);
+        if ((*it)->widget_is_visible) {
+            Parameter * param = *it;
+            Gtk::Widget * widg = param->param_newWidget(tooltips);
+            Glib::ustring * tip = param->param_getTooltip();
+            if (widg) {
+                vbox->pack_start(*widg, true, true, 2);
+                if (tip != NULL) {
+                    tooltips->set_tip(*widg, *tip);
+                }
             }
         }
 
index ebb24cc3090e49e13a2739d211c346621a30b032..a8ea157440505cf24f268e82bd5324801dc86064 100644 (file)
@@ -33,7 +33,8 @@ Parameter::Parameter( const Glib::ustring& label, const Glib::ustring& tip,
       param_label(label),
       oncanvas_editable(false),
       param_tooltip(tip),
-      param_effect(effect)
+      param_effect(effect),
+      widget_is_visible(true)
 {
 }
 
index 71bd5673dc797e7720e93279d902b95c5137c025..61c151b0e9e8398546aed9725df9846a730bfea8 100644 (file)
@@ -74,6 +74,7 @@ public:
     Glib::ustring param_label;
 
     bool oncanvas_editable;
+    bool widget_is_visible;
 
 protected:
     Glib::ustring param_tooltip;