summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-25 21:06:52 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-25 21:06:52 +0000
commitb6f4cdaea27fbf49f924b2684d4c638089314067 (patch)
tree4328e93333d13eccadc18455ba32a7293d3cbd73 /gtk2_ardour/time_axis_view.cc
parentf53cbaede885cd52b8fee59890e33575a4fc11fa (diff)
rationalize destruction pathway (some more); tidy-ify some ImageFrame code
git-svn-id: svn://localhost/ardour2/branches/3.0@6398 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 2c241ee283..4809d9fedd 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -74,6 +74,7 @@ uint32_t TimeAxisView::hSmaller = 0;
uint32_t TimeAxisView::hSmall = 0;
bool TimeAxisView::need_size_info = true;
int const TimeAxisView::_max_order = 512;
+PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
: AxisView (sess),
@@ -178,6 +179,8 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
controls_hbox.show ();
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
+
+ GhostRegion::CatchDeletion.connect (*this, ui_bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
}
TimeAxisView::~TimeAxisView()
@@ -925,24 +928,23 @@ TimeAxisView::add_ghost (RegionView* rv)
if(gr) {
ghosts.push_back(gr);
- gr->CatchDeletion.connect (*this, ui_bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
}
}
void
-TimeAxisView::remove_ghost (RegionView* rv) {
+TimeAxisView::remove_ghost (RegionView* rv)
+{
rv->remove_ghost_in (*this);
}
void
-TimeAxisView::erase_ghost (GhostRegion* gr) {
- if(in_destructor) {
+TimeAxisView::erase_ghost (GhostRegion* gr)
+{
+ if (in_destructor) {
return;
}
-
- list<GhostRegion*>::iterator i;
-
- for (i = ghosts.begin(); i != ghosts.end(); ++i) {
+
+ for (list<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
if ((*i) == gr) {
ghosts.erase (i);
break;