X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Ftracking_text.cc;h=1b3004b3b1f5fd4becfbd23e228c8b4233c9dfaa;hb=f549fcfb7663ec0c37b1e176a742fbe6616fdab3;hp=ea44102f8f2bf6f6d046a70d6897d0e47b20687f;hpb=4eb565e0a9ea54715dcf2c9dd15d9c5f3ceb74e1;p=ardour.git diff --git a/libs/canvas/tracking_text.cc b/libs/canvas/tracking_text.cc index ea44102f8f..1b3004b3b1 100644 --- a/libs/canvas/tracking_text.cc +++ b/libs/canvas/tracking_text.cc @@ -70,7 +70,7 @@ TrackingText::pointer_motion (Duple const & winpos) pos = pos.translate (offset); /* keep inside the window */ - + Rect r (0, 0, _canvas->width(), _canvas->height()); /* border of 200 pixels on the right, and 50 on all other sides */ @@ -83,7 +83,7 @@ TrackingText::pointer_motion (Duple const & winpos) r.y1 = std::max (r.y0, (r.y1 - border)); /* clamp */ - + if (pos.x < r.x0) { pos.x = r.x0; } else if (pos.x > r.x1) { @@ -112,7 +112,7 @@ TrackingText::show_and_track (bool tx, bool ty) if (!was_visible) { /* move to current pointer location. do this after show() so that - * _visible is true, and thus ::pointer_motion() will do + * _visible is true, and thus ::pointer_motion() will do * something. */ Duple winpos; @@ -128,17 +128,23 @@ TrackingText::show_and_track (bool tx, bool ty) void TrackingText::set_x_offset (double o) { + begin_change (); offset.x = o; + end_change (); } void TrackingText::set_y_offset (double o) { + begin_change (); offset.y = o; + end_change (); } void TrackingText::set_offset (Duple const & d) { + begin_change (); offset = d; + end_change (); }