From 72cc39b9f0b340548f395c7f61ca9662b34aea09 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 11:04:37 +0200 Subject: Refactor SPItem bounding box methods: remove NRRect usage and make code using them more obvious. Fix filter region computation. (bzr r10582.1.1) --- src/selcue.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/selcue.cpp') diff --git a/src/selcue.cpp b/src/selcue.cpp index c647c1f96..dbcaf4cc3 100644 --- a/src/selcue.cpp +++ b/src/selcue.cpp @@ -68,8 +68,6 @@ void Inkscape::SelCue::_updateItemBboxes() g_return_if_fail(_selection != NULL); int prefs_bbox = prefs->getBool("/tools/bounding_box"); - SPItem::BBoxType bbox_type = !prefs_bbox ? - SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; GSList const *items = _selection->itemList(); if (_item_bboxes.size() != g_slist_length((GSList *) items)) { @@ -83,7 +81,8 @@ void Inkscape::SelCue::_updateItemBboxes() SPCanvasItem* box = _item_bboxes[bcount ++]; if (box) { - Geom::OptRect const b = item->getBboxDesktop(bbox_type); + Geom::OptRect const b = (prefs_bbox == 0) ? + item->desktopVisualBounds() : item->desktopGeometricBounds(); if (b) { sp_canvas_item_show(box); @@ -118,13 +117,12 @@ void Inkscape::SelCue::_newItemBboxes() g_return_if_fail(_selection != NULL); int prefs_bbox = prefs->getBool("/tools/bounding_box"); - SPItem::BBoxType bbox_type = !prefs_bbox ? - SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; for (GSList const *l = _selection->itemList(); l != NULL; l = l->next) { SPItem *item = (SPItem *) l->data; - Geom::OptRect const b = item->getBboxDesktop(bbox_type); + Geom::OptRect const b = (prefs_bbox == 0) ? + item->desktopVisualBounds() : item->desktopGeometricBounds(); SPCanvasItem* box = NULL; -- cgit v1.2.3