diff options
| author | Tobias Ellinghaus <me@houz.org> | 2019-05-28 06:48:23 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-05-28 06:50:00 +0000 |
| commit | 931aa4a4032c99997058e33df72cd2a31e8e5eba (patch) | |
| tree | 936c2a3194dcb9479884f05e76702e249d50f5e0 /src | |
| parent | Allow translations in LPE add dialog (diff) | |
| download | inkscape-931aa4a4032c99997058e33df72cd2a31e8e5eba.tar.gz inkscape-931aa4a4032c99997058e33df72cd2a31e8e5eba.zip | |
Fix align-to of text objects
Inkscape used to align text baselines relative to the wrong object when
using "First selected" or "Last selected".
Closes !699
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index c112f965d..a714b96f6 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -135,10 +135,10 @@ void ActionAlign::do_action(SPDesktop *desktop, int index) switch (AlignTarget(prefs->getInt("/dialogs/align/align-to", 6))) { case LAST: - focus = SP_ITEM(*--(selected.end())); + focus = SP_ITEM(selected.back()); break; case FIRST: - focus = SP_ITEM(*selected.begin()); + focus = SP_ITEM(selected.front()); break; case BIGGEST: focus = selection->largestItem(horiz); @@ -844,10 +844,10 @@ private : switch (AlignTarget(prefs->getInt("/dialogs/align/align-to", 6))) { case LAST: - focus = SP_ITEM(*selected.begin()); + focus = SP_ITEM(selected.back()); break; case FIRST: - focus = SP_ITEM(*--(selected.end())); + focus = SP_ITEM(selected.front()); break; case BIGGEST: focus = selection->largestItem(Selection::AREA); @@ -867,7 +867,7 @@ private : default: g_assert_not_reached (); break; - }; + }; if(focus) { if (SP_IS_TEXT (focus) || SP_IS_FLOWTEXT (focus)) { |
