Loading cvpcb/cvframe.cpp +34 −0 Original line number Original line Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "macros.h" #include "macros.h" #include "confirm.h" #include "confirm.h" #include "eda_doc.h" #include "eda_doc.h" #include "eda_dde.h" #include "gestfich.h" #include "gestfich.h" #include "param_config.h" #include "param_config.h" #include "bitmaps.h" #include "bitmaps.h" Loading Loading @@ -316,6 +317,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) if( component.m_Module.IsEmpty() && ii > selection ) if( component.m_Module.IsEmpty() && ii > selection ) { { m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); return; return; } } Loading Loading @@ -345,6 +347,7 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event ) if( component.m_Module.IsEmpty() && ii < selection ) if( component.m_Module.IsEmpty() && ii < selection ) { { m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); return; return; } } Loading Loading @@ -500,6 +503,7 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) } } m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints ); m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints ); SendMessageToEESCHEMA(); DisplayStatus(); DisplayStatus(); } } Loading Loading @@ -617,3 +621,33 @@ void CVPCB_MAINFRAME::UpdateTitle() SetTitle( title ); SetTitle( title ); } } /** * Send a remote command to Eeschema via a socket, * Commands are * $PART: "reference" put cursor on component anchor */ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() { char cmd[1024]; int selection; COMPONENT* Component; if( m_components.empty() ) return; selection = m_ListCmp->GetSelection(); if ( selection < 0 ) selection = 0; if( &m_components[ selection ] == NULL ) return; Component = &m_components[ selection ]; sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->m_Reference ) ); SendCommand( MSG_TO_SCH, cmd ); } cvpcb/cvpcb_mainframe.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -233,6 +233,14 @@ public: */ */ void UpdateTitle(); void UpdateTitle(); /** * Function SendMessageToEESCHEMA * Send a remote command to Eeschema via a socket, * Commands are * $PART: "reference" put cursor on component anchor */ void SendMessageToEESCHEMA(); DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE() }; }; Loading Loading
cvpcb/cvframe.cpp +34 −0 Original line number Original line Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "macros.h" #include "macros.h" #include "confirm.h" #include "confirm.h" #include "eda_doc.h" #include "eda_doc.h" #include "eda_dde.h" #include "gestfich.h" #include "gestfich.h" #include "param_config.h" #include "param_config.h" #include "bitmaps.h" #include "bitmaps.h" Loading Loading @@ -316,6 +317,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) if( component.m_Module.IsEmpty() && ii > selection ) if( component.m_Module.IsEmpty() && ii > selection ) { { m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); return; return; } } Loading Loading @@ -345,6 +347,7 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event ) if( component.m_Module.IsEmpty() && ii < selection ) if( component.m_Module.IsEmpty() && ii < selection ) { { m_ListCmp->SetSelection( ii ); m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); return; return; } } Loading Loading @@ -500,6 +503,7 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) } } m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints ); m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints ); SendMessageToEESCHEMA(); DisplayStatus(); DisplayStatus(); } } Loading Loading @@ -617,3 +621,33 @@ void CVPCB_MAINFRAME::UpdateTitle() SetTitle( title ); SetTitle( title ); } } /** * Send a remote command to Eeschema via a socket, * Commands are * $PART: "reference" put cursor on component anchor */ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() { char cmd[1024]; int selection; COMPONENT* Component; if( m_components.empty() ) return; selection = m_ListCmp->GetSelection(); if ( selection < 0 ) selection = 0; if( &m_components[ selection ] == NULL ) return; Component = &m_components[ selection ]; sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->m_Reference ) ); SendCommand( MSG_TO_SCH, cmd ); }
cvpcb/cvpcb_mainframe.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -233,6 +233,14 @@ public: */ */ void UpdateTitle(); void UpdateTitle(); /** * Function SendMessageToEESCHEMA * Send a remote command to Eeschema via a socket, * Commands are * $PART: "reference" put cursor on component anchor */ void SendMessageToEESCHEMA(); DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE() }; }; Loading