Allow Esc key to close Layer Properties window

This commit is contained in:
Keith Whitney 2016-10-23 17:48:16 -04:00
parent cf6cd534ef
commit 2d0dcc8613

View File

@ -139,7 +139,9 @@ private:
if (name()->hasFocus() ||
opacity()->hasFocus() ||
mode()->hasFocus()) {
if (static_cast<KeyMessage*>(msg)->scancode() == kKeyEnter) {
KeyScancode scancode = static_cast<KeyMessage*>(msg)->scancode();
if (scancode == kKeyEnter ||
scancode == kKeyEsc) {
onCommitChange();
closeWindow(this);
return true;