Commit patch from Antia Puentes relative to bug Bug #1125047 : PcbNew: Insert a footprint in the board, from the Library Browser, by double clicking on it, with a change to avoid the button release event (from the double click) to be seen by the main window.
This commit is contained in:
parent
34f7cbc6f9
commit
a379e5d67c
|
@ -84,6 +84,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME )
|
|||
/* listbox events */
|
||||
EVT_LISTBOX( ID_MODVIEW_LIB_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnLibList )
|
||||
EVT_LISTBOX( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList )
|
||||
EVT_LISTBOX_DCLICK( ID_MODVIEW_FOOTPRINT_LIST, FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList )
|
||||
|
||||
EVT_MENU( ID_SET_RELATIVE_OFFSET, FOOTPRINT_VIEWER_FRAME::OnSetRelativeOffset )
|
||||
END_EVENT_TABLE()
|
||||
|
@ -461,6 +462,19 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
void FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList( wxCommandEvent& event )
|
||||
{
|
||||
if( m_Semaphore )
|
||||
{
|
||||
ExportSelectedFootprint( event );
|
||||
// Prevent the double click from being as a single mouse button release
|
||||
// event in the parent window which would cause the part to be parked
|
||||
// rather than staying in mode mode.
|
||||
// Remember the mouse button will be released in the parent window
|
||||
// thus creating a mouse button release event which should be ingnored.
|
||||
((PCB_BASE_FRAME*)GetParent())->SkipNextLeftButtonReleaseEvent();
|
||||
}
|
||||
}
|
||||
|
||||
void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event )
|
||||
{
|
||||
|
|
|
@ -114,6 +114,7 @@ private:
|
|||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void ClickOnLibList( wxCommandEvent& event );
|
||||
void ClickOnFootprintList( wxCommandEvent& event );
|
||||
void DClickOnFootprintList( wxCommandEvent& event );
|
||||
void OnSetRelativeOffset( wxCommandEvent& event );
|
||||
|
||||
void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 );
|
||||
|
|
Loading…
Reference in New Issue