summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2019-03-05 19:52:17 +0000
committerMartin Owens <doctormo@gmail.com>2019-03-05 19:52:17 +0000
commit90ab3e514e96681b65eecb14d873fb78f31ee353 (patch)
tree34001be5d65e30105f282361ce268b7249355324 /src/seltrans.cpp
parentRestore set_extensions_env() (diff)
downloadinkscape-90ab3e514e96681b65eecb14d873fb78f31ee353.tar.gz
inkscape-90ab3e514e96681b65eecb14d873fb78f31ee353.zip
Fix inverted direction with on canvas align handles
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp12
1 files changed, 8 insertions, 4 deletions
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);