properly remove foldback strip so it can be created again
authorLen Ovens <len@ovenwerks.net>
Wed, 28 Aug 2019 20:22:24 +0000 (13:22 -0700)
committerLen Ovens <len@ovenwerks.net>
Wed, 28 Aug 2019 20:23:10 +0000 (13:23 -0700)
gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h

index f8a96fd78ceeba536483014babbd5a42b6c5d109..5a1690cacd3f1585ba7096a787f2350f60497d29 100644 (file)
@@ -365,6 +365,7 @@ Mixer_UI::Mixer_UI ()
 
        MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
        VCAMasterStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context());
+       FoldbackStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_foldback, this, _1), gui_context());
 
        /* handle escape */
 
@@ -740,6 +741,19 @@ Mixer_UI::remove_strip (MixerStrip* strip)
        }
 }
 
+void
+Mixer_UI::remove_foldback (FoldbackStrip* strip)
+{
+       if (_session && _session->deletion_in_progress()) {
+               /* its all being taken care of */
+               return;
+       }
+       if (foldback_strip) {
+               foldback_strip->destroy_();
+       }
+       foldback_strip = 0;
+}
+
 void
 Mixer_UI::presentation_info_changed (PropertyChange const & what_changed)
 {
index a4dd28c533b9e5cde2c1fa864be2f8a81b38716b..16e6d35c3fd1895862e8fdb07347cbc5b62cb606 100644 (file)
@@ -219,7 +219,7 @@ private:
 
        void add_routes (ARDOUR::RouteList&);
        void remove_strip (MixerStrip *);
-
+       void remove_foldback (FoldbackStrip *);
        void add_masters (ARDOUR::VCAList&);
        void remove_master (VCAMasterStrip*);
        void new_masters_created ();