From 96ef6190a69e8101a3c3a8ef8b01cb35042d1f9d Mon Sep 17 00:00:00 2001 From: cilix42 Date: Sun, 21 Jun 2009 19:36:30 +0000 Subject: [PATCH] Remove 'Is visible?' checkbox from LPE editor because it duplicates functionality --- src/live_effects/effect.cpp | 17 ++++++++++------- src/live_effects/parameter/parameter.cpp | 3 ++- src/live_effects/parameter/parameter.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 316495eb4..de0535448 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -278,6 +278,7 @@ Effect::Effect(LivePathEffectObject *lpeobject) is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden { registerParameter( dynamic_cast(&is_visible) ); + is_visible.widget_is_visible = false; } Effect::~Effect() @@ -550,13 +551,15 @@ Effect::newWidget(Gtk::Tooltips * tooltips) std::vector::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); + } } } diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp index ebb24cc30..a8ea15744 100644 --- a/src/live_effects/parameter/parameter.cpp +++ b/src/live_effects/parameter/parameter.cpp @@ -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) { } diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index 71bd5673d..61c151b0e 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -74,6 +74,7 @@ public: Glib::ustring param_label; bool oncanvas_editable; + bool widget_is_visible; protected: Glib::ustring param_tooltip; -- 2.30.2