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
(cherry picked from commit 00c7b64b13
)
This commit is contained in:
parent
c1ec63d4f9
commit
064a9688c0
|
@ -49,10 +49,7 @@ void SCH_EDIT_FRAME::mapExistingAnnotation( std::map<wxString, wxString>& aMap )
|
|||
|
||||
curr_full_uuid.push_back( symbol->m_Uuid );
|
||||
|
||||
wxString ref = symbol->GetRef( curr_sheetpath );
|
||||
|
||||
if( symbol->GetUnitCount() > 1 )
|
||||
ref << LIB_SYMBOL::SubReference( symbol->GetUnitSelection( curr_sheetpath ) );
|
||||
wxString ref = symbol->GetRef( curr_sheetpath, true );
|
||||
|
||||
if( symbol->IsAnnotated( curr_sheetpath ) )
|
||||
aMap[ curr_full_uuid.AsString() ] = ref;
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
|
||||
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
|
||||
|
@ -168,7 +168,7 @@ private:
|
|||
friend class SCH_REFERENCE_LIST;
|
||||
|
||||
/// 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.
|
||||
LIB_SYMBOL* m_libPart; ///< The source symbol from a library.
|
||||
wxPoint m_symbolPos; ///< The physical position of the symbol in schematic
|
||||
|
@ -454,7 +454,7 @@ public:
|
|||
|
||||
printf( " [%-2d] ref:%-8s num:%-3d lib_part:%s\n",
|
||||
i,
|
||||
schref.m_ref.c_str(),
|
||||
schref.m_ref.ToStdString().c_str(),
|
||||
schref.m_numRef,
|
||||
TO_UTF8( schref.GetLibPart()->GetName() ) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue