Eeschema: fix sheet file name case sensitivity bug.
Apparently there are some issues with wxString::CmpNoCase() that was
causing the sheet file name case sensitivity test to incorrectly fail.
Converting the name strings to lower case before comparing resolved
the issue.
(cherry picked from commit 773f45aae3
)
This commit is contained in:
parent
d7605f1449
commit
be12aece5b
|
@ -1621,6 +1621,8 @@ bool SCH_SCREENS::HasSchematic( const wxString& aSchematicFileName )
|
|||
|
||||
bool SCH_SCREENS::CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const
|
||||
{
|
||||
wxString lhsLower;
|
||||
wxString rhsLower;
|
||||
wxFileName lhs;
|
||||
wxFileName rhs = aSchematicFileName;
|
||||
|
||||
|
@ -1633,8 +1635,10 @@ bool SCH_SCREENS::CanCauseCaseSensitivityIssue( const wxString& aSchematicFileNa
|
|||
if( lhs.GetPath() != rhs.GetPath() )
|
||||
continue;
|
||||
|
||||
if( lhs.GetName().CmpNoCase( rhs.GetName() )
|
||||
&& lhs.GetName() != rhs.GetName() )
|
||||
lhsLower = lhs.GetName().Lower();
|
||||
rhsLower = rhs.GetName().Lower();
|
||||
|
||||
if( lhsLower == rhsLower )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue