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:
parent
767d7f2009
commit
773f45aae3
|
@ -1352,6 +1352,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;
|
||||
|
||||
|
@ -1364,8 +1366,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