mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-22 06:41:08 +00:00
Fix respect snap to grid when we move the selection (fix #4021)
This commit is contained in:
parent
709545c57e
commit
3f8a8662fe
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
// Copyright (C) 2019-2023 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -441,7 +441,11 @@ void MovingPixelsState::onCommitMouseMove(Editor* editor,
|
|||||||
KeyAction action = m_editor->getCustomizationDelegate()
|
KeyAction action = m_editor->getCustomizationDelegate()
|
||||||
->getPressedKeyAction(keyContext);
|
->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;
|
moveModifier |= PixelsMovement::SnapToGridMovement;
|
||||||
|
|
||||||
if (int(action & KeyAction::AngleSnap))
|
if (int(action & KeyAction::AngleSnap))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user