From 6162cf1a9f6953319e0e3d6b56354c5cb0f26352 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 3 Nov 2016 00:08:41 +0100 Subject: Add some unit tests for object-set cppification (bzr r15203) --- src/object-set.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/object-set.cpp') diff --git a/src/object-set.cpp b/src/object-set.cpp index fd0b908d1..65e7d45d6 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -204,7 +204,7 @@ SPItem *ObjectSet::_sizeistItem(bool sml, CompareSize compare) { SPItem *ist = NULL; for (auto i = items.begin(); i != items.end(); ++i) { - Geom::OptRect obox = SP_ITEM(*i)->desktopPreferredBounds(); + Geom::OptRect obox = SP_ITEM(*i)->documentPreferredBounds(); if (!obox || obox.empty()) { continue; } @@ -212,7 +212,7 @@ SPItem *ObjectSet::_sizeistItem(bool sml, CompareSize compare) { Geom::Rect bbox = *obox; gdouble size = compare == AREA ? bbox.area() : - (compare == VERTICAL ? bbox.width() : bbox.height()); + (compare == VERTICAL ? bbox.height() : bbox.width()); size = sml ? size : size * -1; if (size < max) { max = size; -- cgit v1.2.3