summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/spellcheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/spellcheck.cpp')
-rw-r--r--src/ui/dialog/spellcheck.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp
index ab0282298..eb32d2245 100644
--- a/src/ui/dialog/spellcheck.cpp
+++ b/src/ui/dialog/spellcheck.cpp
@@ -252,15 +252,14 @@ bool SpellCheck::compareTextBboxes (gconstpointer a, gconstpointer b)//returns a
SPItem *i1 = SP_ITEM(a);
SPItem *i2 = SP_ITEM(b);
- Geom::OptRect bbox1 = i1->desktopVisualBounds();
- Geom::OptRect bbox2 = i2->desktopVisualBounds();
+ Geom::OptRect bbox1 = i1->documentVisualBounds();
+ Geom::OptRect bbox2 = i2->documentVisualBounds();
if (!bbox1 || !bbox2) {
return false;
}
// vector between top left corners
- Geom::Point diff = Geom::Point(bbox2->min()[Geom::X], bbox2->max()[Geom::Y]) -
- Geom::Point(bbox1->min()[Geom::X], bbox1->max()[Geom::Y]);
+ Geom::Point diff = bbox1->min() - bbox2->min();
return diff[Geom::Y] == 0 ? (diff[Geom::X] < 0) : (diff[Geom::Y] < 0);
}