From 66c9e166f8bb99bf4619edc79fe6720514cc2faa Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 30 Jan 2011 13:24:41 +0000 Subject: [PATCH] Update summary when a region is removed. git-svn-id: svn://localhost/ardour2/branches/3.0@8622 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor.cc | 7 +++++++ gtk2_ardour/editor.h | 1 + gtk2_ardour/streamview.cc | 2 ++ gtk2_ardour/streamview.h | 3 ++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index cdbbb59105..864e2eab27 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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 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); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index f16ca7872a..7683fb9875 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -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 (); diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 3a6fcaac9c..f17e66f9d3 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -205,6 +205,8 @@ StreamView::remove_region_view (boost::weak_ptr weak_r) break; } } + + RegionViewRemoved (); /* EMIT SIGNAL */ } void diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index 769255408a..2b542b4a20 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -115,7 +115,8 @@ public: void check_record_layers (boost::shared_ptr, ARDOUR::framepos_t); - sigc::signal RegionViewAdded; + sigc::signal RegionViewAdded; + sigc::signal RegionViewRemoved; protected: StreamView (RouteTimeAxisView&, ArdourCanvas::Group* background_group = 0, ArdourCanvas::Group* canvas_group = 0);