macOS: Fix crash undoing/redoing action while we're drawing

Fix this issue:
https://community.aseprite.org/t/crash-when-i-use-undo/494
This commit is contained in:
David Capello 2017-09-27 12:29:12 -03:00
parent d75b836922
commit 6ca76c0ca9

View File

@ -93,6 +93,8 @@ static bool can_call_global_shortcut(const she::Shortcut& shortcut)
ASSERT(manager);
ui::Widget* focus = manager->getFocus();
return
// The mouse is not capture
(manager->getCapture() == nullptr) &&
// The foreground window must be the main window to avoid calling
// a global command inside a modal dialog.
(manager->getForegroundWindow() == App::instance()->mainWindow()) &&