implement MarkerDrag::abort()
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 5 Feb 2015 23:00:32 +0000 (18:00 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 6 Feb 2015 00:33:31 +0000 (19:33 -0500)
gtk2_ardour/editor_drag.cc

index f34b94e98905e9735ff2dc2ee03dc9f14adeec6a..7ac8f9c16ac0c29eaa12321c0cd28268b5a1b72d 100644 (file)
@@ -3540,9 +3540,20 @@ MarkerDrag::finished (GdkEvent* event, bool movement_occurred)
 }
 
 void
-MarkerDrag::aborted (bool)
+MarkerDrag::aborted (bool movement_occured)
 {
-       /* XXX: TODO */
+       if (!movement_occured) {
+               return;
+       }
+
+       for (CopiedLocationInfo::iterator x = _copied_locations.begin(); x != _copied_locations.end(); ++x) {
+
+               /* move all markers to their original location */
+               
+               for (vector<Marker*>::iterator m = x->markers.begin(); m != x->markers.end(); ++m) {
+                       (*m)->set_position ((*m)->location()->start(), (*m)->location()->end());
+               }
+       }
 }
 
 void