From 628e524075917de62cf17fccbc005e0e3902fb37 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 10 Mar 2011 18:52:36 +0100 Subject: [PATCH] Fix a minor issue in Pcbnew --- pcbnew/controle.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 30e85d5b09..121a989b87 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -211,15 +211,16 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) // this menu's handler is void PCB_BASE_FRAME::ProcessItemSelection() // and it calls SetCurItem() which in turn calls DisplayInfo() on the item. - DrawPanel->m_AbortRequest = true; // changed in false if an item - PopupMenu( &itemMenu ); // m_AbortRequest = false if an item is selected + DrawPanel->m_AbortRequest = true; // changed in false if an item is selected + PopupMenu( &itemMenu ); DrawPanel->MoveCursorToCrossHair(); -// DrawPanel->m_IgnoreMouseEvents = false; - // The function ProcessItemSelection() has set the current item, return it. - item = GetCurItem(); + if( DrawPanel->m_AbortRequest ) // Nothing selected + item = NULL; + else + item = GetCurItem(); } return item;