From 697d8a273285548019284ce4910358e298449e3b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 25 Nov 2014 20:44:26 +0200 Subject: do the right thing when TrackingText::offset is changed --- libs/canvas/canvas/item.h | 4 ++++ libs/canvas/tracking_text.cc | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'libs') diff --git a/libs/canvas/canvas/item.h b/libs/canvas/canvas/item.h index 60fadabfbd..228a03f6bf 100644 --- a/libs/canvas/canvas/item.h +++ b/libs/canvas/canvas/item.h @@ -86,6 +86,10 @@ public: */ virtual void add_items_at_point (Duple /*point*/, std::vector& items) const; + /** Return true if the item covers @param point, false otherwise. + * + * The point is in window coordinates + */ virtual bool covers (Duple const &) const; /** Update _bounding_box and _bounding_box_dirty */ diff --git a/libs/canvas/tracking_text.cc b/libs/canvas/tracking_text.cc index ea44102f8f..c5f754068c 100644 --- a/libs/canvas/tracking_text.cc +++ b/libs/canvas/tracking_text.cc @@ -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 (); } -- cgit v1.2.3