summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 1d4557b90..b41ee1d5c 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -480,18 +480,7 @@ void Inkscape::SelTrans::_updateHandles()
}
if (!_center_is_set) {
- // Extract the position of the center from the first selected object
- GSList *items = (GSList *) _desktop->selection->itemList();
- if (items) {
- SPItem *first = reinterpret_cast<SPItem*>(g_slist_last(items)->data); // from the first item in selection
- if (first->isCenterSet()) { // only if set explicitly
- _center = first->getCenter();
- } else {
- _center = _box.midpoint();
- }
- } else {
- _center = _box.midpoint();
- }
+ _center = _desktop->selection->center();
_center_is_set = true;
}