PROJECT_TREE_ITEM::Rename() make test for extension case insensitive.

File types are not case sensitive.
This commit is contained in:
jean-pierre charras 2023-10-29 20:02:04 +01:00
parent 6633eadfc8
commit 06581c964b
1 changed files with 2 additions and 2 deletions

View File

@ -124,10 +124,10 @@ bool PROJECT_TREE_ITEM::Rename( const wxString& name, bool check )
return false;
// If required, prompt the user if the filename extension has changed:
wxString ext = PROJECT_TREE_PANE::GetFileExt( GetType() );
wxString ext = PROJECT_TREE_PANE::GetFileExt( GetType() ).Lower();
wxString full_ext = wxT( "." ) + ext;
if( check && !ext.IsEmpty() && !newFile.EndsWith( full_ext ) )
if( check && !ext.IsEmpty() && !newFile.Lower().EndsWith( full_ext ) )
{
wxMessageDialog dialog( m_parent, _( "Changing file extension will change file type.\n"
"Do you want to continue ?" ),