From ed6229c5b41b72df6c59878aaae328cb2b6e3559 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 12 Jul 2013 13:06:09 -0400 Subject: Use Jon Cruz info about OptRect to correctly get area height and width (bzr r12417) --- src/selection.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index 8f43d8e70..784219c88 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -372,12 +372,12 @@ SPItem *Selection::_sizeistItem(bool sml, Selection::CompareSize compare) { SPItem *ist = NULL; for ( GSList const *i = items; i != NULL ; i = i->next ) { - Geom::OptRect bbox = SP_ITEM(i->data)->desktopPreferredBounds(); - if (!bbox) continue; + Geom::OptRect obox = SP_ITEM(i->data)->desktopPreferredBounds(); + if (!obox || obox.isEmpty()) continue; + Geom::Rect bbox = *obox; - gdouble size = compare == 2 ? - (*bbox)[Geom::X].extent() * (*bbox)[Geom::Y].extent() : - (*bbox)[compare == 1 ? Geom::X : Geom::Y].extent(); + gdouble size = compare == 2 ? bbox.area() : + (compare == 1 ? bbox.width() : bbox.height()); size = sml ? size : size * -1; if (size < max) { max = size; -- cgit v1.2.3