summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index c6bb5c37af..f1511c6ffa 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -741,11 +741,17 @@ Selection::remove (Marker* m)
}
}
-
void
Selection::add (Marker* m)
{
if (find (markers.begin(), markers.end(), m) == markers.end()) {
+
+ /* disambiguate which remove() for the compiler */
+
+ void (Selection::*pmf)(Marker*) = &Selection::remove;
+
+ m->GoingAway.connect (bind (mem_fun (*this, pmf), m));
+
markers.push_back (m);
MarkersChanged();
}