Commit 5c3b480a authored by dickelbeck's avatar dickelbeck

center PCBNEW parts on screen when tracking clicks and parts from EESCHEMA

parent 6acce67a
...@@ -20,6 +20,10 @@ email address. ...@@ -20,6 +20,10 @@ email address.
in PCBNEW when there is more than one click candidate at the same mouse in PCBNEW when there is more than one click candidate at the same mouse
or cursor coordinates. COLLECTOR not committed yet. or cursor coordinates. COLLECTOR not committed yet.
* More beautification. * More beautification.
* The mouse click and part synchronization from EESCHEMA to PCBNEW would
track fine but would not always position the PCBNEW part on screen. Now
we center it unconditionally. No change was made in the reverse direction
since that code uses the long established Find support.
2007-Aug-14 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Aug-14 UPDATE Dick Hollenbeck <dick@softplc.com>
......
...@@ -31,8 +31,10 @@ void RemoteCommand( const char* cmdline ) ...@@ -31,8 +31,10 @@ void RemoteCommand( const char* cmdline )
{ {
char line[1024]; char line[1024];
wxString msg; wxString msg;
char* idcmd, * text; char* idcmd;
char* text;
WinEDA_PcbFrame* frame = EDA_Appl->m_PcbFrame; WinEDA_PcbFrame* frame = EDA_Appl->m_PcbFrame;
MODULE* module;
strncpy( line, cmdline, sizeof(line) - 1 ); strncpy( line, cmdline, sizeof(line) - 1 );
msg = CONV_FROM_UTF8( line ); msg = CONV_FROM_UTF8( line );
...@@ -48,7 +50,7 @@ void RemoteCommand( const char* cmdline ) ...@@ -48,7 +50,7 @@ void RemoteCommand( const char* cmdline )
{ {
msg = CONV_FROM_UTF8( text ); msg = CONV_FROM_UTF8( text );
MODULE* module = ReturnModule( frame->m_Pcb, msg ); module = ReturnModule( frame->m_Pcb, msg );
msg.Printf( _( "Locate module %s %s" ), msg.GetData(), msg.Printf( _( "Locate module %s %s" ), msg.GetData(),
module ? wxT( "Ok" ) : wxT( "not found" ) ); module ? wxT( "Ok" ) : wxT( "not found" ) );
...@@ -68,7 +70,6 @@ void RemoteCommand( const char* cmdline ) ...@@ -68,7 +70,6 @@ void RemoteCommand( const char* cmdline )
if( idcmd && strcmp( idcmd, "$PIN:" ) == 0 ) if( idcmd && strcmp( idcmd, "$PIN:" ) == 0 )
{ {
wxString pinName, modName; wxString pinName, modName;
MODULE* module;
D_PAD* pad = NULL; D_PAD* pad = NULL;
int netcode = -1; int netcode = -1;
...@@ -112,6 +113,9 @@ void RemoteCommand( const char* cmdline ) ...@@ -112,6 +113,9 @@ void RemoteCommand( const char* cmdline )
msg.Printf( _( "Locate Pin %s (module %s)" ), pinName.GetData(), modName.GetData() ); msg.Printf( _( "Locate Pin %s (module %s)" ), pinName.GetData(), modName.GetData() );
frame->Affiche_Message( msg ); frame->Affiche_Message( msg );
} }
if( module ) // center the module on screen.
frame->Recadre_Trace( false );
} }
......
This diff is collapsed.
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