summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/node-tool.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-08-18 15:29:16 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-08-18 15:29:16 +0000
commit3ffefe1e05e3858ce6584dc644817c411232dc77 (patch)
treee992648f9c1598efe6c810009213dbf9b7b31ff4 /src/ui/tools/node-tool.cpp
parentFormatting last commit (diff)
downloadinkscape-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/tools/node-tool.cpp')
-rw-r--r--src/ui/tools/node-tool.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index a14114cb7..63161b3cd 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -723,13 +723,17 @@ void NodeTool::update_tip(GdkEvent *event) {
}
}
+/**
+ * @param sel Area in desktop coordinates
+ */
void NodeTool::select_area(Geom::Rect const &sel, GdkEventButton *event) {
using namespace Inkscape::UI;
if (this->_multipath->empty()) {
// if multipath is empty, select rubberbanded items rather than nodes
Inkscape::Selection *selection = this->desktop->selection;
- std::vector<SPItem*> items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel);
+ auto sel_doc = desktop->dt2doc() * sel;
+ std::vector<SPItem*> items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel_doc);
selection->setList(items);
} else {
if (!held_shift(*event)) {