mirror of https://github.com/aseprite/aseprite.git
Merge 4e397c4ed4
into 3fcb000eb1
This commit is contained in:
commit
e8edbf101c
|
@ -477,14 +477,13 @@ bool MovingPixelsState::onKeyDown(Editor* editor, KeyMessage* msg)
|
||||||
|
|
||||||
if (msg->scancode() == kKeyEnter || // TODO make this key customizable
|
if (msg->scancode() == kKeyEnter || // TODO make this key customizable
|
||||||
msg->scancode() == kKeyEnterPad || msg->scancode() == kKeyEsc) {
|
msg->scancode() == kKeyEnterPad || msg->scancode() == kKeyEsc) {
|
||||||
dropPixels();
|
|
||||||
|
|
||||||
// The escape key drop pixels and deselect the mask.
|
|
||||||
if (msg->scancode() == kKeyEsc) { // TODO make this key customizable
|
if (msg->scancode() == kKeyEsc) { // TODO make this key customizable
|
||||||
Command* cmd = Commands::instance()->byId(CommandId::DeselectMask());
|
m_pixelsMovement->discardImage(PixelsMovement::DontCommitChanges);
|
||||||
UIContext::instance()->executeCommandFromMenuOrShortcut(cmd);
|
m_discarded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dropPixels();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue