summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-03-22 18:25:58 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-03-22 18:25:58 +0000
commitb1e8887aa3ba9ab7711b443fd73f94b293447c95 (patch)
tree0b4cb8ecd57e9f99da8e73b194de5bec15beac89 /src/selection.cpp
parentmore information on objects selected in groups (diff)
downloadinkscape-b1e8887aa3ba9ab7711b443fd73f94b293447c95.tar.gz
inkscape-b1e8887aa3ba9ab7711b443fd73f94b293447c95.zip
optimization: prevent taking bbox twice of the first object in selection
(bzr r271)
Diffstat (limited to 'src/selection.cpp')
-rw-r--r--src/selection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/selection.cpp b/src/selection.cpp
index 87e0788d8..763713c9d 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -303,8 +303,10 @@ NR::Rect Selection::bounds() const
GSList const *i = items;
NR::Rect bbox = sp_item_bbox_desktop(SP_ITEM(i->data));
+ GSList const *i_start = i;
while (i != NULL) {
- bbox = NR::Rect::union_bounds(bbox, sp_item_bbox_desktop(SP_ITEM(i->data)));
+ if (i != i_start)
+ bbox = NR::Rect::union_bounds(bbox, sp_item_bbox_desktop(SP_ITEM(i->data)));
i = i->next;
}