Eeschema: void CollectOtherUnits(): do not try to collect others units
of a not annotated component. Fixes #4142 https://gitlab.com/kicad/code/kicad/issues/4142
This commit is contained in:
parent
e811101567
commit
029b1b0b22
|
@ -273,10 +273,11 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH*
|
|||
|
||||
// The value, footprint and datasheet fields should be kept in sync in multi-unit
|
||||
// parts.
|
||||
// Of course the component must be annotated to collect other units.
|
||||
if( editFrame && parent && parent->Type() == SCH_COMPONENT_T
|
||||
&& ( fieldType == VALUE || fieldType == FOOTPRINT || fieldType == DATASHEET ) )
|
||||
{
|
||||
SCH_COMPONENT* thisUnit = static_cast<SCH_COMPONENT*>( parent );
|
||||
SCH_COMPONENT* thisUnit = static_cast<SCH_COMPONENT*>( parent );
|
||||
std::vector<SCH_COMPONENT*> otherUnits;
|
||||
|
||||
CollectOtherUnits( editFrame->GetCurrentSheet(), thisUnit, &otherUnits );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -171,7 +171,8 @@ bool EE_COLLECTOR::IsDraggableJunction() const
|
|||
void CollectOtherUnits( SCH_SHEET_PATH& aSheet, SCH_COMPONENT* aUnit,
|
||||
std::vector<SCH_COMPONENT*>* otherUnits )
|
||||
{
|
||||
if( aUnit->GetUnitCount() > 1 )
|
||||
// Obviously, one can collect other units only if aUnit is annotated.
|
||||
if( aUnit->GetUnitCount() > 1 && aUnit->IsAnnotated( &aSheet ) )
|
||||
{
|
||||
const LIB_ID thisLibId = aUnit->GetLibId();
|
||||
const wxString thisRef = aUnit->GetRef( &aSheet );
|
||||
|
|
Loading…
Reference in New Issue