diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-02 20:49:59 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-02 20:49:59 +0000 |
| commit | 7cec7f966e2bee144373b198c5d0a5fbb36b4a44 (patch) | |
| tree | d93376fe40ef4802145231777aec99160c7ade1f /src/ui | |
| parent | Migrate launchpad offset branch to git (diff) | |
| parent | Live effect: Ellipse from Points (diff) | |
| download | inkscape-7cec7f966e2bee144373b198c5d0a5fbb36b4a44.tar.gz inkscape-7cec7f966e2bee144373b198c5d0a5fbb36b4a44.zip | |
Merge from trunk
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index d622b5e06..045b4a98e 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -169,11 +169,20 @@ void ActionAlign::do_action(SPDesktop *desktop, int index) Geom::Point mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X], a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]); - bool changed = false; if (sel_as_group) - b = selection->preferredBounds(); + if (focus) { + // use bounding box of all selected elements except the "focused" element + Inkscape::ObjectSet copy; + copy.add(selection->objects().begin(), selection->objects().end()); + copy.remove(focus); + b = copy.preferredBounds(); + } else { + // use bounding box of all selected elements + b = selection->preferredBounds(); + } //Move each item in the selected list separately + bool changed = false; for (std::vector<SPItem*>::iterator it(selected.begin()); it != selected.end(); ++it) { |
