Browse Source

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
7.0
Seth Hillbrand 3 years ago
parent
commit
00c7b64b13
  1. 5
      eeschema/annotate.cpp
  2. 6
      eeschema/sch_reference_list.h

5
eeschema/annotate.cpp

@ -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;

6
eeschema/sch_reference_list.h

@ -141,7 +141,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
@ -175,7 +175,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.
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",
i,
schref.m_ref.c_str(),
schref.m_ref.ToStdString().c_str(),
schref.m_numRef,
TO_UTF8( schref.GetLibPart()->GetName() ) );
}

Loading…
Cancel
Save