diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-08-18 15:29:16 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-08-18 15:29:16 +0000 |
| commit | 3ffefe1e05e3858ce6584dc644817c411232dc77 (patch) | |
| tree | e992648f9c1598efe6c810009213dbf9b7b31ff4 /src/ui/contextmenu.cpp | |
| parent | Formatting last commit (diff) | |
| download | inkscape-3ffefe1e05e3858ce6584dc644817c411232dc77.tar.gz inkscape-3ffefe1e05e3858ce6584dc644817c411232dc77.zip | |
reduce usage of desktop coordinates (#341)
- avoid unnecessary internal usage of desktop coordinates, e.g.
in SpellCheck::compareTextBboxes
- document whether a function argument is in document or desktop
coordinates, e.g. for SPDocument::getItemsInBox
Diffstat (limited to 'src/ui/contextmenu.cpp')
| -rw-r--r-- | src/ui/contextmenu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/contextmenu.cpp b/src/ui/contextmenu.cpp index b33653bfd..2b281a096 100644 --- a/src/ui/contextmenu.cpp +++ b/src/ui/contextmenu.cpp @@ -88,7 +88,8 @@ ContextMenu::ContextMenu(SPDesktop *desktop, SPItem *item) : } AddSeparator(); /* Lock/Unock Hide/Unhide*/ - Geom::Rect b(_desktop->point(),_desktop->point() + Geom::Point(1,1)); + auto point_doc = _desktop->point() * _desktop->dt2doc(); + Geom::Rect b(point_doc, point_doc + Geom::Point(1, 1)); std::vector< SPItem * > down_items = _desktop->getDocument()->getItemsPartiallyInBox( _desktop->dkey, b, true, true, true, true); bool has_down_hidden = false; bool has_down_locked = false; |
