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.
This commit is contained in:
Wayne Stambaugh 2019-11-19 16:06:18 -05:00
parent 767d7f2009
commit 773f45aae3
1 changed files with 6 additions and 2 deletions

View File

@ -1352,6 +1352,8 @@ bool SCH_SCREENS::HasSchematic( const wxString& aSchematicFileName )
bool SCH_SCREENS::CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const bool SCH_SCREENS::CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const
{ {
wxString lhsLower;
wxString rhsLower;
wxFileName lhs; wxFileName lhs;
wxFileName rhs = aSchematicFileName; wxFileName rhs = aSchematicFileName;
@ -1364,8 +1366,10 @@ bool SCH_SCREENS::CanCauseCaseSensitivityIssue( const wxString& aSchematicFileNa
if( lhs.GetPath() != rhs.GetPath() ) if( lhs.GetPath() != rhs.GetPath() )
continue; continue;
if( lhs.GetName().CmpNoCase( rhs.GetName() ) lhsLower = lhs.GetName().Lower();
&& lhs.GetName() != rhs.GetName() ) rhsLower = rhs.GetName().Lower();
if( lhsLower == rhsLower )
return true; return true;
} }