diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-07-12 17:06:09 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-07-12 17:06:09 +0000 |
| commit | ed6229c5b41b72df6c59878aaae328cb2b6e3559 (patch) | |
| tree | 1dfd0c1113b5fd7e65bd8984beaf516f9085ad0e /src/selection.cpp | |
| parent | Do not effect the focus in align computation (diff) | |
| download | inkscape-ed6229c5b41b72df6c59878aaae328cb2b6e3559.tar.gz inkscape-ed6229c5b41b72df6c59878aaae328cb2b6e3559.zip | |
Use Jon Cruz info about OptRect to correctly get area height and width
(bzr r12417)
Diffstat (limited to '')
| -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; |
