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
This commit is contained in:
Wayne Stambaugh 2016-09-27 20:40:59 -04:00
parent 245607d05c
commit 92216b7351
1 changed files with 4 additions and 4 deletions

View File

@ -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 );