From c2cf793f7a1f7e6b989623547569524b007fc848 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 5 Mar 2011 11:35:18 +0100 Subject: [PATCH] eeschema: very minorbug fix --- eeschema/schedit.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 998f4325e3..48aecc1aa0 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -585,9 +585,11 @@ void SCH_EDIT_FRAME::OnCancelCurrentCommand( wxCommandEvent& aEvent ) } else { - // Stop the current command (if any) but keep the current tool - DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); - } + if( DrawPanel->IsMouseCaptured() ) // Stop the current command but keep the current tool + DrawPanel->EndMouseCapture(); + else // Deselect current tool + DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); + } }