Make annotation case-insensitive
U1 and u1 are allowed but if they both exist in the same schematic, they will throw an ERC and annotation error. Reannotating will make them U1 and u2. Fixes https://gitlab.com/kicad/code/kicad/issues/11862
This commit is contained in:
parent
199d595ccd
commit
00c7b64b13
|
@ -49,10 +49,7 @@ void SCH_EDIT_FRAME::mapExistingAnnotation( std::map<wxString, wxString>& aMap )
|
||||||
|
|
||||||
curr_full_uuid.push_back( symbol->m_Uuid );
|
curr_full_uuid.push_back( symbol->m_Uuid );
|
||||||
|
|
||||||
wxString ref = symbol->GetRef( curr_sheetpath );
|
wxString ref = symbol->GetRef( curr_sheetpath, true );
|
||||||
|
|
||||||
if( symbol->GetUnitCount() > 1 )
|
|
||||||
ref << LIB_SYMBOL::SubReference( symbol->GetUnitSelection( curr_sheetpath ) );
|
|
||||||
|
|
||||||
if( symbol->IsAnnotated( curr_sheetpath ) )
|
if( symbol->IsAnnotated( curr_sheetpath ) )
|
||||||
aMap[ curr_full_uuid.AsString() ] = ref;
|
aMap[ curr_full_uuid.AsString() ] = ref;
|
||||||
|
|
|
@ -141,7 +141,7 @@ public:
|
||||||
|
|
||||||
int CompareRef( const SCH_REFERENCE& item ) const
|
int CompareRef( const SCH_REFERENCE& item ) const
|
||||||
{
|
{
|
||||||
return m_ref.compare( item.m_ref );
|
return m_ref.CmpNoCase( item.m_ref );
|
||||||
}
|
}
|
||||||
|
|
||||||
int CompareLibName( const SCH_REFERENCE& item ) const
|
int CompareLibName( const SCH_REFERENCE& item ) const
|
||||||
|
@ -175,7 +175,7 @@ private:
|
||||||
friend class SCH_REFERENCE_LIST;
|
friend class SCH_REFERENCE_LIST;
|
||||||
|
|
||||||
/// Symbol reference prefix, without number (for IC1, this is IC) )
|
/// Symbol reference prefix, without number (for IC1, this is IC) )
|
||||||
UTF8 m_ref; // it's private, use the accessors please
|
wxString m_ref; // it's private, use the accessors please
|
||||||
SCH_SYMBOL* m_rootSymbol; ///< The symbol associated the reference object.
|
SCH_SYMBOL* m_rootSymbol; ///< The symbol associated the reference object.
|
||||||
LIB_SYMBOL* m_libPart; ///< The source symbol from a library.
|
LIB_SYMBOL* m_libPart; ///< The source symbol from a library.
|
||||||
VECTOR2I m_symbolPos; ///< The physical position of the symbol in schematic
|
VECTOR2I m_symbolPos; ///< The physical position of the symbol in schematic
|
||||||
|
@ -486,7 +486,7 @@ public:
|
||||||
|
|
||||||
printf( " [%-2d] ref:%-8s num:%-3d lib_part:%s\n",
|
printf( " [%-2d] ref:%-8s num:%-3d lib_part:%s\n",
|
||||||
i,
|
i,
|
||||||
schref.m_ref.c_str(),
|
schref.m_ref.ToStdString().c_str(),
|
||||||
schref.m_numRef,
|
schref.m_numRef,
|
||||||
TO_UTF8( schref.GetLibPart()->GetName() ) );
|
TO_UTF8( schref.GetLibPart()->GetName() ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue