diff --git a/src/app/ui/editor/moving_pixels_state.cpp b/src/app/ui/editor/moving_pixels_state.cpp index c10d38ff8..d56a00348 100644 --- a/src/app/ui/editor/moving_pixels_state.cpp +++ b/src/app/ui/editor/moving_pixels_state.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2019-2022 Igara Studio S.A. +// Copyright (C) 2019-2023 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -441,7 +441,11 @@ void MovingPixelsState::onCommitMouseMove(Editor* editor, KeyAction action = m_editor->getCustomizationDelegate() ->getPressedKeyAction(keyContext); - if (int(action & KeyAction::SnapToGrid)) + bool snapToGrid = m_editor->docPref().grid.snap(); + if (bool(action & KeyAction::SnapToGrid)) + snapToGrid = !snapToGrid; + + if (snapToGrid) moveModifier |= PixelsMovement::SnapToGridMovement; if (int(action & KeyAction::AngleSnap))