make per-region note-tracking in MidiPlaylist work correctly, or something very close...
[ardour.git] / gtk2_ardour / canvas-note.cc
index b43514edcc82d5383bba0a5303e614b00714a2bc..a3aa6ed8acbf028732137e4d49fcebd1d550eeb1 100644 (file)
@@ -18,5 +18,22 @@ CanvasNote::on_event(GdkEvent* ev)
        }
 }
 
+void
+CanvasNote::move_event(double dx, double dy)
+{
+       property_x1() = property_x1() + dx;
+       property_y1() = property_y1() + dy;
+       property_x2() = property_x2() + dx;
+       property_y2() = property_y2() + dy;
+
+       if (_text) {
+               _text->hide();
+               _text->property_x() = _text->property_x() + dx;
+               _text->property_y() = _text->property_y() + dy;
+               _text->show();
+       }
+}
+
+
 } // namespace Gnome
 } // namespace Canvas