From c6e43004bd28f3c3370f47fe2e1a89595235d36b Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 26 Aug 2020 05:09:34 -0400 Subject: [PATCH] Fix #1815 with correct activation checks --- src/ui/modifiers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/modifiers.cpp b/src/ui/modifiers.cpp index afb02c8a3f..0db063116b 100644 --- a/src/ui/modifiers.cpp +++ b/src/ui/modifiers.cpp @@ -30,7 +30,7 @@ decltype(Modifier::_modifiers) Modifier::_modifiers { {Type::CANVAS_SCROLL_Y, new Modifier("canvas-scroll-y", _("Vertical scroll"), _("Scroll up and down"), 0, SCROLL)}, {Type::CANVAS_SCROLL_X, new Modifier("canvas-scroll-x", _("Horizontal scroll"), _("Scroll left and right"), SHIFT, SCROLL)}, {Type::CANVAS_ZOOM, new Modifier("canvas-zoom", _("Canvas zoom"), _("Zoom in and out with scroll wheel"), CTRL, SCROLL)}, - {Type::CANVAS_ROTATE, new Modifier("canvas-rotate", _("Canavas rotate"), _("Rotate the canvas with scroll wheel"), SHIFT & CTRL, SCROLL)}, + {Type::CANVAS_ROTATE, new Modifier("canvas-rotate", _("Canavas rotate"), _("Rotate the canvas with scroll wheel"), SHIFT | CTRL, SCROLL)}, // Select tool modifiers (minus transforms) {Type::SELECT_ADD_TO, new Modifier("select-add-to", _("Add to selection"), _("Add items to existing selection"), SHIFT, CLICK)}, @@ -81,7 +81,7 @@ bool Modifier::active(int button_state) // TODO: // * ALT key is sometimes MOD1, MOD2 etc, if we find other ALT keys, set the ALT bit // * SUPER key could be HYPER or META, these cases need to be considered. - return get_and_mask() & button_state; + return get_and_mask() & button_state == get_and_mask(); } /** -- GitLab