Commit 151f81aa authored by Dick Hollenbeck's avatar Dick Hollenbeck

merge patch with refinement

parents 275f02ad 79015495
...@@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) ...@@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME )
/* listbox events */ /* listbox events */
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList ) EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList )
EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::ClickOnCmpList ) 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 ) EVT_MENU( ID_SET_RELATIVE_OFFSET, LIB_VIEW_FRAME::OnSetRelativeOffset )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -497,6 +498,18 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event ) ...@@ -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 ) void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event )
{ {
......
...@@ -166,6 +166,7 @@ private: ...@@ -166,6 +166,7 @@ private:
void ExportToSchematicLibraryPart( wxCommandEvent& event ); void ExportToSchematicLibraryPart( wxCommandEvent& event );
void ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag ); void ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
void DClickOnCmpList( wxCommandEvent& event );
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment