Commit 5c3b480a authored by dickelbeck's avatar dickelbeck

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

parent 6acce67a
......@@ -20,7 +20,11 @@ email address.
in PCBNEW when there is more than one click candidate at the same mouse
or cursor coordinates. COLLECTOR not committed yet.
* 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>
================================================================================
......
......@@ -31,8 +31,10 @@ void RemoteCommand( const char* cmdline )
{
char line[1024];
wxString msg;
char* idcmd, * text;
char* idcmd;
char* text;
WinEDA_PcbFrame* frame = EDA_Appl->m_PcbFrame;
MODULE* module;
strncpy( line, cmdline, sizeof(line) - 1 );
msg = CONV_FROM_UTF8( line );
......@@ -48,7 +50,7 @@ void RemoteCommand( const char* cmdline )
{
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(),
module ? wxT( "Ok" ) : wxT( "not found" ) );
......@@ -68,7 +70,6 @@ void RemoteCommand( const char* cmdline )
if( idcmd && strcmp( idcmd, "$PIN:" ) == 0 )
{
wxString pinName, modName;
MODULE* module;
D_PAD* pad = NULL;
int netcode = -1;
......@@ -112,6 +113,9 @@ void RemoteCommand( const char* cmdline )
msg.Printf( _( "Locate Pin %s (module %s)" ), pinName.GetData(), modName.GetData() );
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