diff options
| author | Andrew Higginson <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
|---|---|---|
| committer | Andrew <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
| commit | 80960b623a99aae1402ab651b2974ef544ed3b03 (patch) | |
| tree | ba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/graphlayout.cpp | |
| parent | try to fix bug (diff) | |
| parent | GDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff) | |
| download | inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip | |
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/graphlayout.cpp')
| -rw-r--r-- | src/graphlayout.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/graphlayout.cpp b/src/graphlayout.cpp index 4f536beb3..b0e00211a 100644 --- a/src/graphlayout.cpp +++ b/src/graphlayout.cpp @@ -1,5 +1,6 @@ -/** @file - * @brief Interface between Inkscape code (SPItem) and graphlayout functions. +/** + * @file + * Interface between Inkscape code (SPItem) and graphlayout functions. */ /* * Authors: @@ -19,6 +20,7 @@ #include <cstring> #include <cstdlib> #include <float.h> +#include <2geom/transforms.h> #include "desktop.h" #include "inkscape.h" @@ -127,7 +129,7 @@ void graphlayout(GSList const *const items) { ++i) { SPItem *u=*i; - Geom::OptRect const item_box(u->getBboxDesktop()); + Geom::OptRect const item_box = u->desktopVisualBounds(); if(item_box) { Geom::Point ll(item_box->min()); Geom::Point ur(item_box->max()); @@ -156,11 +158,12 @@ void graphlayout(GSList const *const items) { ++i) { SPItem *iu=*i; - map<string,unsigned>::iterator i=nodelookup.find(iu->getId()); - if(i==nodelookup.end()) { + map<string,unsigned>::iterator i_iter=nodelookup.find(iu->getId()); + map<string,unsigned>::iterator i_iter_end=nodelookup.end(); + if(i_iter==i_iter_end) { continue; } - unsigned u=i->second; + unsigned u=i_iter->second; GSList *nlist=iu->avoidRef->getAttachedConnectors(Avoid::runningFrom); list<SPItem *> connectors; @@ -229,8 +232,8 @@ void graphlayout(GSList const *const items) { map<string,unsigned>::iterator i=nodelookup.find(u->getId()); if(i!=nodelookup.end()) { Rectangle* r=rs[i->second]; - Geom::OptRect item_box(u->getBboxDesktop()); - if(item_box) { + Geom::OptRect item_box = u->desktopVisualBounds(); + if (item_box) { Geom::Point const curr(item_box->midpoint()); Geom::Point const dest(r->getCentreX(),r->getCentreY()); sp_item_move_rel(u, Geom::Translate(dest - curr)); |
