diff options
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; |
