diff -ru kicad-2012.01.19-3.rev3256/cvpcb/cvframe.cpp kicad-2012.01.19-4.rev3256/cvpcb/cvframe.cpp --- kicad-2012.01.19-3.rev3256/cvpcb/cvframe.cpp 2012-01-22 17:23:37.000000000 +0100 +++ kicad-2012.01.19-4.rev3256/cvpcb/cvframe.cpp 2012-01-27 17:41:38.000000000 +0100 @@ -525,6 +525,25 @@ } m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints ); + + // Preview of the already assigned footprint. + // Find the footprint that was already choosen for this component and select it. + wxString module = *(&m_components[ selection ].m_Module); + + for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ ) + { + wxString footprintName; + wxString msg = (*m_FootprintList->m_ActiveFootprintList)[ii]; + msg.Trim( true ); + msg.Trim( false ); + footprintName = msg.AfterFirst( wxChar( ' ' ) ); + + if( module.Cmp( footprintName ) == 0 ) + m_FootprintList->SetSelection( ii, true ); + else + m_FootprintList->SetSelection( ii, false ); + } + SendMessageToEESCHEMA(); DisplayStatus(); } @@ -660,13 +679,13 @@ selection = m_ListCmp->GetSelection(); - if ( selection < 0 ) - selection = 0; + if ( selection < 0 ) + selection = 0; if( &m_components[ selection ] == NULL ) - return; + return; - Component = &m_components[ selection ]; + Component = &m_components[ selection ]; sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->m_Reference ) ); diff -ru kicad-2012.01.19-3.rev3256/pcbnew/basepcbframe.cpp kicad-2012.01.19-4.rev3256/pcbnew/basepcbframe.cpp --- kicad-2012.01.19-3.rev3256/pcbnew/basepcbframe.cpp 2012-01-22 17:23:38.000000000 +0100 +++ kicad-2012.01.19-4.rev3256/pcbnew/basepcbframe.cpp 2012-01-27 17:44:46.000000000 +0100 @@ -390,6 +390,8 @@ guide.SetIgnoreModulesOnCmp( ! m_Pcb->IsElementVisible( MOD_FR_VISIBLE ) ); guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( PAD_BK_VISIBLE ) ); guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( PAD_FR_VISIBLE ) ); + guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( MOD_VALUES_VISIBLE ) ); + guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( MOD_REFERENCES_VISIBLE ) ); return guide; } diff -ru kicad-2012.01.19-3.rev3256/pcbnew/collectors.cpp kicad-2012.01.19-4.rev3256/pcbnew/collectors.cpp --- kicad-2012.01.19-3.rev3256/pcbnew/collectors.cpp 2012-01-22 17:23:38.000000000 +0100 +++ kicad-2012.01.19-4.rev3256/pcbnew/collectors.cpp 2012-01-27 17:45:33.000000000 +0100 @@ -280,6 +280,12 @@ if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_N_FRONT ) goto exit; + + if( m_Guide->IgnoreModulesVals() && item == module->m_Value ) + goto exit; + + if( m_Guide->IgnoreModulesRefs() && item == module->m_Reference ) + goto exit; } break; diff -ru kicad-2012.01.19-3.rev3256/pcbnew/collectors.h kicad-2012.01.19-4.rev3256/pcbnew/collectors.h --- kicad-2012.01.19-3.rev3256/pcbnew/collectors.h 2012-01-22 17:23:38.000000000 +0100 +++ kicad-2012.01.19-4.rev3256/pcbnew/collectors.h 2012-01-27 17:47:12.000000000 +0100 @@ -176,6 +176,18 @@ } /** + * Function IgnoreModulesVals + * @return bool - true if should ignore modules values. + */ + virtual bool IgnoreModulesVals() const = 0; + + /** + * Function IgnoreModulesRefs + * @return bool - true if should ignore module references. + */ + virtual bool IgnoreModulesRefs() const = 0; + + /** * Function UseHitTesting * @return bool - true if Inspect() should use BOARD_ITEM::HitTest() * or false if Inspect() should use BOARD_ITEM::BoundsTest(). @@ -383,6 +395,8 @@ bool m_IgnoreModulesOnCmp; bool m_IgnorePadsOnFront; bool m_IgnorePadsOnBack; + bool m_IgnoreModulesVals; + bool m_IgnoreModulesRefs; public: @@ -419,6 +433,9 @@ m_IgnorePadsOnFront = false; m_IgnorePadsOnBack = false; + + m_IgnoreModulesVals = false; + m_IgnoreModulesRefs = false; } @@ -550,6 +567,20 @@ */ bool IgnorePadsOnFront() const { return m_IgnorePadsOnFront; } void SetIgnorePadsOnFront(bool ignore) { m_IgnorePadsOnFront = ignore; } + + /** + * Function IgnoreModulesVals + * @return bool - true if should ignore modules values. + */ + bool IgnoreModulesVals() const { return m_IgnoreModulesVals; } + void SetIgnoreModulesVals(bool ignore) { m_IgnoreModulesVals = ignore; } + + /** + * Function IgnoreModulesRefs + * @return bool - true if should ignore modules references. + */ + bool IgnoreModulesRefs() const { return m_IgnoreModulesRefs; } + void SetIgnoreModulesRefs(bool ignore) { m_IgnoreModulesRefs = ignore; } }; diff -ru kicad-2012.01.19-3.rev3256/TODO.txt kicad-2012.01.19-4.rev3256/TODO.txt --- kicad-2012.01.19-3.rev3256/TODO.txt 2012-01-22 17:23:38.000000000 +0100 +++ kicad-2012.01.19-4.rev3256/TODO.txt 2012-01-27 17:39:15.000000000 +0100 @@ -26,11 +26,6 @@ but is now in scripts/python/ky temporarily. -CvPCB ------ -* Preview of the already assigned footprint. - - EESchema -------- * Drag and drop between two EESchema windows.