mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-30 12:19:04 +00:00
Restore possibility to use Ctrl+Alt to copy selection and snap-to-grid at the same time (fix #3497)
If we don't activate Brush Size mouse wheel action when using Ctrl+Alt key modifiers in a selection-like tool we can use Ctrl+Alt to make copies of the selected region and snap-to-grid at the same time.
This commit is contained in:
parent
87a68b0a81
commit
901175d476
@ -497,6 +497,14 @@ bool StandbyState::onKeyDown(Editor* editor, KeyMessage* msg)
|
|||||||
Keys keys = KeyboardShortcuts::instance()
|
Keys keys = KeyboardShortcuts::instance()
|
||||||
->getDragActionsFromKeyMessage(KeyContext::MouseWheel, msg);
|
->getDragActionsFromKeyMessage(KeyContext::MouseWheel, msg);
|
||||||
if (!keys.empty()) {
|
if (!keys.empty()) {
|
||||||
|
// Don't enter DraggingValueState to change brush size if we are
|
||||||
|
// in a selection-like tool
|
||||||
|
if (keys.size() == 1 &&
|
||||||
|
keys[0]->wheelAction() == WheelAction::BrushSize &&
|
||||||
|
editor->getCurrentEditorInk()->isSelection()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
EditorStatePtr newState(new DraggingValueState(editor, keys));
|
EditorStatePtr newState(new DraggingValueState(editor, keys));
|
||||||
editor->setState(newState);
|
editor->setState(newState);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user