diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-05-23 22:05:08 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-03 16:12:00 -0400 |
commit | 073df89c4d5a8f1347c3c4c847a15d9cd359c2da (patch) | |
tree | 283bb583098ef70d73162ec397a99d25699a8242 /libs/canvas/item.cc | |
parent | 54a56cd3c6b8d6ffaea3343c4f4a79b52c586661 (diff) |
use window-based coordinates when picking current item so that we get per-item (per-scroll-group,really) computation of position and coverage.
Diffstat (limited to 'libs/canvas/item.cc')
-rw-r--r-- | libs/canvas/item.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc index 0706df6bae..3b13a12ca8 100644 --- a/libs/canvas/item.cc +++ b/libs/canvas/item.cc @@ -318,6 +318,11 @@ Item::find_scroll_parent () Item const * i = this; ScrollGroup const * last_scroll_group = 0; + /* Don't allow a scroll group to find itself as its own scroll parent + */ + + i = i->parent (); + while (i) { ScrollGroup const * sg = dynamic_cast<ScrollGroup const *> (i); if (sg) { @@ -591,7 +596,7 @@ Item::depth () const bool Item::covers (Duple const & point) const { - Duple p = canvas_to_item (point); + Duple p = window_to_item (point); if (_bounding_box_dirty) { compute_bounding_box (); |