eeschema: end mouse capture before exiting sheet

The mouse capture has a cleanup associated that we call to cancel the
action.  This prevents issues when trying to copy between hierarchical
sheets.

Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
This commit is contained in:
Seth Hillbrand 2019-05-28 21:17:57 -07:00
parent 1058ba6a0f
commit 455136ee50
1 changed files with 4 additions and 0 deletions

View File

@ -264,6 +264,10 @@ void HIERARCHY_NAVIG_DLG::onSelectSheetPath( wxTreeEvent& event )
void SCH_EDIT_FRAME::DisplayCurrentSheet()
{
// If we are doing something with the mouse, cancel the action before changing sheet
if( m_canvas->IsMouseCaptured() )
m_canvas->EndMouseCapture( GetToolId(), GetGalCanvas()->GetCurrentCursor() );
SetRepeatItem( NULL );
ClearMsgPanel();