Commit e3e0efa1 authored by CHARRAS's avatar CHARRAS
Browse files

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

parent ff64accf
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with 
Please add newer entries at the top, list the date and your name with 
email address.
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>
2007-Oct-08 UPDATE   Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
================================================================================
+ gerbview
+ gerbview
+6 −3
Original line number Original line Diff line number Diff line
@@ -53,15 +53,18 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
    /* Cross probing to pcbnew if a pin or a component is found */
    /* Cross probing to pcbnew if a pin or a component is found */
    switch( DrawStruct->Type() )
    switch( DrawStruct->Type() )
    {
    {
	case DRAW_PART_TEXT_STRUCT_TYPE:
    case COMPONENT_FIELD_DRAW_TYPE:
    case COMPONENT_FIELD_DRAW_TYPE:
		SendMessageToPCBNEW( DrawStruct );
        LibItem = (EDA_SchComponentStruct*) DrawStruct->m_Parent;
		SendMessageToPCBNEW( DrawStruct,LibItem );
        break;
        break;


    case DRAW_LIB_ITEM_STRUCT_TYPE:
    case DRAW_LIB_ITEM_STRUCT_TYPE:
        Pin = LocateAnyPin( m_CurrentScreen->EEDrawList, GetScreen()->m_Curseur, &LibItem );
        Pin = LocateAnyPin( m_CurrentScreen->EEDrawList, GetScreen()->m_Curseur, &LibItem );
        if( Pin )
        if( Pin )
            break; // Priority is probing a pin first
            break; // Priority is probing a pin first
		SendMessageToPCBNEW( DrawStruct );
        LibItem = (EDA_SchComponentStruct*) DrawStruct;
		SendMessageToPCBNEW( DrawStruct, LibItem );
        break;
        break;


    default:
    default:
@@ -84,7 +87,7 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
                                 CYAN );
                                 CYAN );


        // Cross probing:2 - pin found, and send a locate pin command to pcbnew (hightlight net)
        // Cross probing:2 - pin found, and send a locate pin command to pcbnew (hightlight net)
		SendMessageToPCBNEW( Pin );
		SendMessageToPCBNEW( Pin, LibItem );
    }
    }
    return DrawStruct;
    return DrawStruct;
}
}
+7 −10
Original line number Original line Diff line number Diff line
@@ -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,
/** Send a remote command to eeschema via a socket,
@@ -97,16 +98,15 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync )
        return;
        return;


    LibDrawPin* Pin = NULL;
    LibDrawPin* Pin = NULL;
    EDA_SchComponentStruct* LibItem = NULL;
    char        Line[1024];
    char        Line[1024];


    /* Cross probing to pcbnew if a pin or a component is found */
    /* Cross probing to pcbnew if a pin or a component is found */
    switch( objectToSync->Type() )
    switch( objectToSync->Type() )
    {
    {
    case DRAW_PART_TEXT_STRUCT_TYPE:
    case COMPONENT_FIELD_DRAW_TYPE:
    case COMPONENT_FIELD_DRAW_TYPE:
    {
    {
        PartTextStruct* Field = (PartTextStruct*) objectToSync;
//        PartTextStruct* Field = (PartTextStruct*) objectToSync;
        LibItem = (EDA_SchComponentStruct*) Field->m_Parent;
        if( LibItem == NULL )
        if( LibItem == NULL )
            break;
            break;
        sprintf( Line, "$PART: %s", CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) );
        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;
        break;


    case COMPONENT_PIN_DRAW_TYPE:
    case COMPONENT_PIN_DRAW_TYPE:
        Pin     = (LibDrawPin*) objectToSync;
        
        LibItem = (EDA_SchComponentStruct*) Pin->m_Parent;
        if( LibItem == NULL )
        if( LibItem == NULL )
            break;
            break;
        
        Pin = (LibDrawPin*) objectToSync;
        if( Pin->m_PinNum )
        if( Pin->m_PinNum )
        {
        {
            wxString pinnum;
            wxString pinnum;
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@


COMMON_GLOBL wxString g_BuildVersion
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
#ifdef EDA_BASE
	(wxT("(2007-09-26)"))
	(wxT("(2007-10-08)"))
#endif
#endif
;
;


+2 −1
Original line number Original line Diff line number Diff line
@@ -1051,7 +1051,8 @@ public:
        bool mouseWarp );
        bool mouseWarp );


    /* Cross probing with pcbnew */
    /* Cross probing with pcbnew */
    void                    SendMessageToPCBNEW( EDA_BaseStruct* objectToSync );
    void                    SendMessageToPCBNEW( EDA_BaseStruct* objectToSync,
							EDA_SchComponentStruct* LibItem	);


    /* netlist generation */
    /* netlist generation */
    void*                   BuildNetListBase();
    void*                   BuildNetListBase();
Loading