X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcanvas-note.cc;h=a3aa6ed8acbf028732137e4d49fcebd1d550eeb1;hb=1474b10d39873538f93a466517f518c5013d1ac3;hp=b43514edcc82d5383bba0a5303e614b00714a2bc;hpb=1bf79fa88502a156a71cd3d2de35aa234950c40c;p=ardour.git diff --git a/gtk2_ardour/canvas-note.cc b/gtk2_ardour/canvas-note.cc index b43514edcc..a3aa6ed8ac 100644 --- a/gtk2_ardour/canvas-note.cc +++ b/gtk2_ardour/canvas-note.cc @@ -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