This commit is contained in:
JoshuaL03 2025-07-23 18:49:17 -04:00 committed by GitHub
commit 45df73c725
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -477,14 +477,13 @@ bool MovingPixelsState::onKeyDown(Editor* editor, KeyMessage* msg)
if (msg->scancode() == kKeyEnter || // TODO make this key customizable
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
Command* cmd = Commands::instance()->byId(CommandId::DeselectMask());
UIContext::instance()->executeCommandFromMenuOrShortcut(cmd);
m_pixelsMovement->discardImage(PixelsMovement::DontCommitChanges);
m_discarded = true;
}
dropPixels();
return true;
}