From 90ab3e514e96681b65eecb14d873fb78f31ee353 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Tue, 5 Mar 2019 11:52:17 -0800 Subject: Fix inverted direction with on canvas align handles --- src/seltrans.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index bd8483a6f..46cf9d88b 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1356,12 +1356,16 @@ void Inkscape::SelTrans::align(guint state, SPSelTransHandle const &handle) bool sel_as_group = prefs->getBool("/dialogs/align/sel-as-groups"); int align_to = prefs->getInt("/dialogs/align/align-to", 6); - int verb_id = -1; + int verb_offset = 0; if (state & GDK_SHIFT_MASK) { - verb_id = AlignVerb[handle.control + AlignHandleToVerb + AlignShiftVerb]; - } else { - verb_id = AlignVerb[handle.control + AlignHandleToVerb]; + verb_offset += AlignShiftVerb; + } + if (!this->_desktop->is_yaxisdown()) { + verb_offset += AlignOrientVerb; } + + int verb_id = AlignVerb[handle.control + AlignHandleToVerb + verb_offset]; + if(verb_id >= 0) { prefs->setBool("/dialogs/align/sel-as-groups", (state & GDK_CONTROL_MASK) != 0); prefs->setInt("/dialogs/align/align-to", 6); -- cgit v1.2.3