← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it

 

El lun, 03-12-2012 a las 10:11 -0600, Dick Hollenbeck escribió:
> > +void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event )
> > +{
> > +    if (m_Semaphore) {
> 
> *) no space after if
> *) space in front and after m_Semaphore
> *) { is on wrong line.
> 
> 
> Please fix, resubmit, thanks.
> 

Fixed!. Thanks

=== modified file 'eeschema/viewlib_frame.cpp'
--- eeschema/viewlib_frame.cpp	2012-09-22 11:19:37 +0000
+++ eeschema/viewlib_frame.cpp	2012-12-03 16:16:08 +0000
@@ -74,6 +74,7 @@
     /* 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,13 @@
     }
 }
 
+void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event )
+{
+    if( m_Semaphore )
+    {
+        ExportToSchematicLibraryPart ( event );
+    }
+}
 
 void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event )
 {

=== modified file 'eeschema/viewlib_frame.h'
--- eeschema/viewlib_frame.h	2012-09-12 09:53:11 +0000
+++ eeschema/viewlib_frame.h	2012-12-03 15:50:54 +0000
@@ -166,6 +166,7 @@
     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()
 };


Follow ups

References