From dd07c0572ba4fa5c21f64c7217821113d2b0ea99 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 9 Oct 2007 13:10:58 +0000 Subject: [PATCH] todo.txt update --- eeschema/cross-probing.cpp | 28 ++++++++++++++++------------ todo.txt | 8 ++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 9195974955..ca4a8c0300 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -93,7 +93,8 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync ) * $PIN: number $PART: reference put cursor on the footprint pad */ { - if ( objectToSync == NULL )return; + if( objectToSync == NULL ) + return; LibDrawPin* Pin = NULL; EDA_SchComponentStruct* LibItem = NULL; @@ -106,7 +107,8 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync ) { PartTextStruct* Field = (PartTextStruct*) objectToSync; LibItem = (EDA_SchComponentStruct*) Field->m_Parent; - if( LibItem == NULL ) break; + if( LibItem == NULL ) + break; sprintf( Line, "$PART: %s", CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) ); SendCommand( MSG_TO_PCB, Line ); } @@ -118,23 +120,25 @@ void WinEDA_SchematicFrame::SendMessageToPCBNEW( EDA_BaseStruct* objectToSync ) SendCommand( MSG_TO_PCB, Line ); break; - case COMPONENT_PIN_DRAW_TYPE: - Pin = (LibDrawPin*) objectToSync; - LibItem = (EDA_SchComponentStruct *) Pin->m_Parent; - if( LibItem == NULL ) break; - if ( Pin->m_PinNum ) + Pin = (LibDrawPin*) objectToSync; + + LibItem = (EDA_SchComponentStruct*) Pin->m_Parent; + if( LibItem == NULL ) + break; + + if( Pin->m_PinNum ) { wxString pinnum; Pin->ReturnPinStringNum( pinnum ); sprintf( Line, "$PIN: %s $PART: %s", CONV_TO_UTF8( pinnum ), CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) ); } - else - sprintf( Line, "$PART: %s", CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) ); - - SendCommand( MSG_TO_PCB, Line ); - break; + else + sprintf( Line, "$PART: %s", CONV_TO_UTF8( LibItem->m_Field[REFERENCE].m_Text ) ); + + SendCommand( MSG_TO_PCB, Line ); + break; default: break; diff --git a/todo.txt b/todo.txt index 8dd281e454..c5360cdd76 100644 --- a/todo.txt +++ b/todo.txt @@ -62,3 +62,11 @@ 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 library loading. +