Commit e6e50f3c authored by charras's avatar charras

solved: minor problem in crossprobing (eeschema to pcbnew)

parent 8bed5053
...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion ...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h" # include "config.h"
(wxT(KICAD_SVN_VERSION)) (wxT(KICAD_SVN_VERSION))
# else # else
(wxT("(20081019-unstable)")) /* main program version */ (wxT("(20081106-unstable)")) /* main program version */
# endif # endif
#endif #endif
; ;
...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion ...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion
# include "config.h" # include "config.h"
(wxT(KICAD_ABOUT_VERSION)) (wxT(KICAD_ABOUT_VERSION))
# else # else
(wxT("(20081019-unstable)")) /* svn date & rev (normally overridden) */ (wxT("(20081106-unstable)")) /* svn date & rev (normally overridden) */
# endif # endif
#endif #endif
; ;
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
/*****************************************************************/ /*****************************************************************/
/* cross-probing.cpp */ /* cross-probing.cpp */
/** Handle messages between pcbnew and eeschema via a socket,
* the port number is
* KICAD_PCB_PORT_SERVICE_NUMBER (currently 4242) (eeschema to pcbnew)
* KICAD_SCH_PORT_SERVICE_NUMBER (currently 4243) (pcbnew to eeschema)
* Note: these ports must be enabled for firewall protection
*/
#include "fctsys.h" #include "fctsys.h"
...@@ -53,21 +59,12 @@ void RemoteCommand( const char* cmdline ) ...@@ -53,21 +59,12 @@ void RemoteCommand( const char* cmdline )
if( module ) if( module )
msg.Printf( _( "%s found" ), modName.GetData() ); msg.Printf( _( "%s found" ), modName.GetData() );
else else
msg.Printf( _( "%s not found"), modName.GetData() ); msg.Printf( _( "%s not found" ), modName.GetData() );
frame->Affiche_Message( msg ); frame->Affiche_Message( msg );
if( module ) if( module )
{
wxClientDC dc( frame->DrawPanel );
frame->DrawPanel->PrepareGraphicContext( &dc );
frame->DrawPanel->CursorOff( &dc );
frame->GetScreen()->m_Curseur = module->GetPosition(); frame->GetScreen()->m_Curseur = module->GetPosition();
frame->DrawPanel->CursorOn( &dc );
frame->SetCurItem( module );
} }
}
else if( strcmp( idcmd, "$PIN:" ) == 0 ) else if( strcmp( idcmd, "$PIN:" ) == 0 )
{ {
wxString pinName; wxString pinName;
...@@ -80,10 +77,6 @@ void RemoteCommand( const char* cmdline ) ...@@ -80,10 +77,6 @@ void RemoteCommand( const char* cmdline )
if( text && strcmp( text, "$PART:" ) == 0 ) if( text && strcmp( text, "$PART:" ) == 0 )
text = strtok( NULL, "\n\r" ); text = strtok( NULL, "\n\r" );
wxClientDC dc( frame->DrawPanel );
frame->DrawPanel->PrepareGraphicContext( &dc );
modName = CONV_FROM_UTF8( text ); modName = CONV_FROM_UTF8( text );
module = frame->m_Pcb->FindModuleByReference( modName ); module = frame->m_Pcb->FindModuleByReference( modName );
...@@ -91,19 +84,21 @@ void RemoteCommand( const char* cmdline ) ...@@ -91,19 +84,21 @@ void RemoteCommand( const char* cmdline )
pad = module->FindPadByName( pinName ); pad = module->FindPadByName( pinName );
if( pad ) if( pad )
{
netcode = pad->GetNet(); netcode = pad->GetNet();
// put cursor on the pad:
frame->GetScreen()->m_Curseur = pad->GetPosition();
}
if( netcode > 0 ) /* hightlighted the net selected net*/ if( netcode > 0 ) /* highlight the pad net*/
{ {
if( g_HightLigt_Status ) /* erase the old hightlighted net */ g_HightLigt_Status = 1;
frame->Hight_Light( &dc );
g_HightLigth_NetCode = netcode; g_HightLigth_NetCode = netcode;
frame->Hight_Light( &dc ); /* hightlighted the new one */ }
else
frame->DrawPanel->CursorOff( &dc ); {
frame->GetScreen()->m_Curseur = pad->GetPosition(); g_HightLigt_Status = 0;
frame->DrawPanel->CursorOn( &dc ); g_HightLigth_NetCode = 0;
} }
if( module == NULL ) if( module == NULL )
...@@ -122,7 +117,7 @@ void RemoteCommand( const char* cmdline ) ...@@ -122,7 +117,7 @@ void RemoteCommand( const char* cmdline )
frame->Affiche_Message( msg ); frame->Affiche_Message( msg );
} }
if( module ) // if found, center the module on screen. if( module ) // if found, center the module on screen, and redraw the screen.
frame->Recadre_Trace( false ); frame->Recadre_Trace( false );
} }
......
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