From 92216b73515db3997a411257c33ef567699fada6 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 27 Sep 2016 20:40:59 -0400 Subject: [PATCH] Eeschema: fix assertion on delete node hot key while busy. Performing a delete node hot key operation while Eeschema is busy performing another operation causes an assertion in the delete node command event handler in debug builds. It also causes the operation in progress to be cleared if the assertion is ignored or in release builds. Fix a similar issue when the leave current sheet hot key is called while busing performing another operation which causes rather interesting behavior in the sheet that was exited. Fixes lp:1627434 https://bugs.launchpad.net/kicad/+bug/1627434 --- eeschema/hotkeys.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index f05e696e8e..bb4d76e43e 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -457,8 +457,6 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, case HK_ZOOM_CENTER: case HK_ZOOM_AUTO: case HK_ZOOM_SELECTION: - case HK_LEAVE_SHEET: - case HK_DELETE_NODE: case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving case HK_SAVE_BLOCK: // Copy block to paste buffer. cmd.SetId( hotKey->m_IdMenuEvent ); @@ -485,10 +483,12 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, } break; - case HK_UNDO: - case HK_REDO: + case HK_UNDO: // Hot keys that map to command IDs that cannot be called + case HK_REDO: // while busy performing another command. case HK_FIND_ITEM: case HK_FIND_REPLACE: + case HK_DELETE_NODE: + case HK_LEAVE_SHEET: if( notBusy ) { cmd.SetId( hotKey->m_IdMenuEvent );