Update summary when a region is removed.
authorCarl Hetherington <carl@carlh.net>
Sun, 30 Jan 2011 13:24:41 +0000 (13:24 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 30 Jan 2011 13:24:41 +0000 (13:24 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8622 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/streamview.cc
gtk2_ardour/streamview.h

index cdbbb59105810b13021f236b79aaf5e33f3b83d8..864e2eab272e260a0f84ccfa6fa1301b7d4e8bb3 100644 (file)
@@ -4815,6 +4815,12 @@ Editor::region_view_added (RegionView *)
        _summary->set_dirty ();
 }
 
+void
+Editor::region_view_removed ()
+{
+       _summary->set_dirty ();
+}
+
 TimeAxisView*
 Editor::axis_view_from_route (boost::shared_ptr<Route> r) const
 {
@@ -4880,6 +4886,7 @@ Editor::handle_new_route (RouteList& routes)
                rtv->effective_gain_display ();
 
                rtv->view()->RegionViewAdded.connect (sigc::mem_fun (*this, &Editor::region_view_added));
+               rtv->view()->RegionViewRemoved.connect (sigc::mem_fun (*this, &Editor::region_view_removed));
        }
 
        _routes->routes_added (new_views);
index f16ca7872ad8b92f381c422211a0909d86035f1e..7683fb9875ef12091d30b1981f02fa91d441f509 100644 (file)
@@ -2024,6 +2024,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        EditorSummary* _summary;
 
        void region_view_added (RegionView *);
+       void region_view_removed ();
 
        void update_canvas_now ();
 
index 3a6fcaac9c29c44eafe3dad1cab9876a556c9cd5..f17e66f9d3d5d22527053aa217914112d460c7a2 100644 (file)
@@ -205,6 +205,8 @@ StreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
                        break;
                }
        }
+
+       RegionViewRemoved (); /* EMIT SIGNAL */
 }
 
 void
index 769255408a04da844f6cb3d82e9395f3a6274ee5..2b542b4a200625364469047903540206b291af67 100644 (file)
@@ -115,7 +115,8 @@ public:
 
        void check_record_layers (boost::shared_ptr<ARDOUR::Region>, ARDOUR::framepos_t);
        
-       sigc::signal<void,RegionView*> RegionViewAdded;
+       sigc::signal<void, RegionView*> RegionViewAdded;
+       sigc::signal<void> RegionViewRemoved;
 
 protected:
        StreamView (RouteTimeAxisView&, ArdourCanvas::Group* background_group = 0, ArdourCanvas::Group* canvas_group = 0);