From e1278f8d1a67c682e0750b3b6ae7636957bb7382 Mon Sep 17 00:00:00 2001 From: Gellule Xg Date: Thu, 30 Jun 2011 17:07:08 -1000 Subject: Give a chance to a shape to have an up to date curve before approximating it with points. Fixes connector bug #640985. Fixed bugs: - https://launchpad.net/bugs/640985 (bzr r10393) --- src/conn-avoid-ref.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/conn-avoid-ref.cpp') diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 4c6139672..fad11bb89 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -491,6 +491,7 @@ static std::vector approxItemWithPoints(SPItem const *item, const G } else if (SP_IS_SHAPE(item)) { + SP_SHAPE(item)->setShape(); SPCurve* item_curve = SP_SHAPE(item)->getCurve(); // make sure it has an associated curve if (item_curve) -- cgit v1.2.3 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/conn-avoid-ref.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/conn-avoid-ref.cpp') diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index fad11bb89..331865254 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -394,7 +394,7 @@ Geom::Point SPAvoidRef::getConnectionPointPos(const int type, const int id) if ( type == ConnPointDefault ) { // For now, just default to the centre of the item - Geom::OptRect bbox = item->getBounds(item->i2doc_affine()); + Geom::OptRect bbox = item->documentVisualBounds(); pos = (bbox) ? bbox->midpoint() : Geom::Point(0, 0); } else -- cgit v1.2.3