From 455136ee5073d89f59449edc032dce07bb7c99b4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 28 May 2019 21:17:57 -0700 Subject: [PATCH] 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 --- eeschema/hierarch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 75a689ab06..6f701b6d42 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -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();