Prevent erroneous splitting icons in the editor mixer strip's processor box.
authorCarl Hetherington <carl@carlh.net>
Thu, 10 Feb 2011 02:44:56 +0000 (02:44 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 10 Feb 2011 02:44:56 +0000 (02:44 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8816 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor_mixer.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_strip.h
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h

index 9cb680463e9cb3be426403490cddb5c1f0b91246..4a18d0c81345adec5448e72add6341d8da676aef 100644 (file)
@@ -816,6 +816,11 @@ Editor::show_window ()
        if (!is_visible ()) {
                show_all ();
 
+               /* XXX: this is a bit unfortunate; it would probably
+                  be nicer if we could just call show () above rather
+                  than needing the show_all ()
+               */
+               
                /* re-hide stuff if necessary */
                editor_list_button_toggled ();
                parameter_changed ("show-summary");
@@ -832,6 +837,10 @@ Editor::show_window ()
                        tv = (static_cast<TimeAxisView*>(*i));
                        tv->reset_height ();
                }
+
+               if (current_mixer_strip) {
+                       current_mixer_strip->hide_things ();
+               }
        }
 
        present ();
index ec7189223502e72145cd83d81d9d03659a0f13a8..ae045d7a45fbcf5648acadea81b82ff5e7983ca2 100644 (file)
@@ -121,7 +121,7 @@ Editor::show_editor_mixer (bool yn)
                if (current_mixer_strip->get_parent() == 0) {
                        global_hpacker.pack_start (*current_mixer_strip, Gtk::PACK_SHRINK );
                        global_hpacker.reorder_child (*current_mixer_strip, 0);
-                       current_mixer_strip->show_all ();
+                       current_mixer_strip->show ();
                }
 
        } else {
index 33b012aebb27d9bee17fcef1eb8718d35132a5bc..87943812291403f36ede771a87141084aa12183b 100644 (file)
@@ -1904,3 +1904,9 @@ MixerStrip::plugin_selector()
 {
        return _mixer.plugin_selector();
 }
+
+void
+MixerStrip::hide_things ()
+{
+       processor_box.hide_things ();
+}
index fb56c5284b963cc9379a1b966b6de645e6eb9b18..58eb2a0e19fac65b74f444dc03c5623eea15500f 100644 (file)
@@ -107,6 +107,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
                return _mixer_owned;
        }
 
+       void hide_things ();
+
        sigc::signal<void> WidthChanged;
 
        /** The delivery that we are handling the level for with our fader has changed */
index c5454d59aab73626590b4057dc632477df05d75e..6019f20f7f0ad85e74ecc59313b19a718fab26dd 100644 (file)
@@ -384,6 +384,12 @@ PluginInsertProcessorEntry::plugin_insert_splitting_changed ()
        }
 }
 
+void
+PluginInsertProcessorEntry::hide_things ()
+{
+       plugin_insert_splitting_changed ();
+}
+
 void
 PluginInsertProcessorEntry::setup_visuals ()
 {
@@ -2285,6 +2291,15 @@ ProcessorBox::mixer_strip_delivery_changed (boost::weak_ptr<Delivery> w)
        }
 }
 
+void
+ProcessorBox::hide_things ()
+{
+       list<ProcessorEntry*> c = processor_display.children ();
+       for (list<ProcessorEntry*>::iterator i = c.begin(); i != c.end(); ++i) {
+               (*i)->hide_things ();
+       }
+}
+
 ProcessorWindowProxy::ProcessorWindowProxy (
        string const & name,
        XMLNode const * node,
index a6395fc4ef4830f910257e77600341854d7a53f9..bd5f18b947dc432abb3b9b76ac3c0af1f2d75b8d 100644 (file)
@@ -119,6 +119,9 @@ public:
        void set_enum_width (Width);
        virtual void set_pixel_width (int) {}
 
+       /** Hide any widgets that should be hidden */
+       virtual void hide_things () {}
+
 protected:
        
        virtual void setup_visuals ();
@@ -173,6 +176,8 @@ class PluginInsertProcessorEntry : public ProcessorEntry
 public:
        PluginInsertProcessorEntry (boost::shared_ptr<ARDOUR::PluginInsert>, Width);
 
+       void hide_things ();
+       
 private:
        void setup_visuals ();
        void plugin_insert_splitting_changed ();
@@ -206,6 +211,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        void select_all_inserts ();
        void select_all_sends ();
 
+       void hide_things ();
+
        Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
        void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>);