merge patch with refinement

This commit is contained in:
Dick Hollenbeck 2012-12-04 13:12:50 -06:00
commit 151f81aa95
2 changed files with 20 additions and 6 deletions

View File

@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME )
/* listbox events */
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList )
EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::ClickOnCmpList )
EVT_LISTBOX_DCLICK( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::DClickOnCmpList )
EVT_MENU( ID_SET_RELATIVE_OFFSET, LIB_VIEW_FRAME::OnSetRelativeOffset )
END_EVENT_TABLE()
@ -497,6 +498,18 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event )
}
}
void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event )
{
if( m_Semaphore )
{
ExportToSchematicLibraryPart( event );
// Prevent the double click from being as a single click in the parent
// window which would cause the part to be parked rather than staying
// in drag mode.
event.StopPropagation();
}
}
void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event )
{

View File

@ -166,6 +166,7 @@ private:
void ExportToSchematicLibraryPart( wxCommandEvent& event );
void ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
void DClickOnCmpList( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
};