Commit e3e0efa1 authored by CHARRAS's avatar CHARRAS

eeschema cross-probing bug solved ( due to last modification): pins/pads not probed

parent ff64accf
......@@ -4,6 +4,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Oct-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ eeschema:
cross-probing minor bug solved ( due to last modification): pins/pads not probed
2007-Oct-08 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
+ gerbview
......
......@@ -53,15 +53,18 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
/* Cross probing to pcbnew if a pin or a component is found */
switch( DrawStruct->Type() )
{
case DRAW_PART_TEXT_STRUCT_TYPE:
case COMPONENT_FIELD_DRAW_TYPE:
SendMessageToPCBNEW( DrawStruct );
LibItem = (EDA_SchComponentStruct*) DrawStruct->m_Parent;
SendMessageToPCBNEW( DrawStruct,LibItem );
break;
case DRAW_LIB_ITEM_STRUCT_TYPE:
Pin = LocateAnyPin( m_CurrentScreen->EEDrawList, GetScreen()->m_Curseur, &LibItem );
if( Pin )
break; // Priority is probing a pin first
SendMessageToPCBNEW( DrawStruct );
LibItem = (EDA_SchComponentStruct*) DrawStruct;
SendMessageToPCBNEW( DrawStruct, LibItem );
break;
default:
......@@ -84,7 +87,7 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
CYAN );
// Cross probing:2 - pin found, and send a locate pin command to pcbnew (hightlight net)
SendMessageToPCBNEW( Pin );
SendMessageToPCBNEW( Pin, LibItem );
}
return DrawStruct;
}
......
......@@ -83,7 +83,8 @@ void RemoteCommand( const char* cmdline )
/*****************************************************************************/
void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync )
void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync,
EDA_SchComponentStruct* LibItem )
/*****************************************************************************/
/** Send a remote command to eeschema via a socket,
......@@ -96,17 +97,16 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync )
if( objectToSync == NULL )
return;
LibDrawPin* Pin = NULL;
EDA_SchComponentStruct* LibItem = NULL;
char Line[1024];
LibDrawPin* Pin = NULL;
char Line[1024];
/* Cross probing to pcbnew if a pin or a component is found */
switch( objectToSync->Type() )
{
case DRAW_PART_TEXT_STRUCT_TYPE:
case COMPONENT_FIELD_DRAW_TYPE:
{
PartTextStruct* Field = (PartTextStruct*) objectToSync;
LibItem = (EDA_SchComponentStruct*) Field->m_Parent;
// PartTextStruct* Field = (PartTextStruct*) objectToSync;
if( LibItem == NULL )
break;
sprintf( Line, "$PART: %s", CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) );
......@@ -121,12 +121,9 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync )
break;
case COMPONENT_PIN_DRAW_TYPE:
Pin = (LibDrawPin*) objectToSync;
LibItem = (EDA_SchComponentStruct*) Pin->m_Parent;
if( LibItem == NULL )
break;
Pin = (LibDrawPin*) objectToSync;
if( Pin->m_PinNum )
{
wxString pinnum;
......
......@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2007-09-26)"))
(wxT("(2007-10-08)"))
#endif
;
......
......@@ -1051,7 +1051,8 @@ public:
bool mouseWarp );
/* Cross probing with pcbnew */
void SendMessageToPCBNEW( EDA_BaseStruct* objectToSync );
void SendMessageToPCBNEW( EDA_BaseStruct* objectToSync,
EDA_SchComponentStruct* LibItem );
/* netlist generation */
void* BuildNetListBase();
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -62,14 +62,5 @@ the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
as zoom changes, the effective real size of the MARKER changes.
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
*** cross probing from eeschema to pcbnew is broken:
When a pin is selected in eeschema, pcbnew is not asked to find it. The problem was
tracked down to this block of code in eeschema/cross-probing.cpp
LibItem = (EDA_SchComponentStruct*) Pin->m_Parent;
if( LibItem == NULL )
break;
apparently the parent of the pin is not being set during component instantiation.
The parent must be the instantiated parent, not the general library component so
we can get the instantiated reference.
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