IDE: don't lose the case of unit name when saving the unit if its filename was suggested in lowercase and user didn't touch it

git-svn-id: trunk@32908 -
This commit is contained in:
maxim 2011-10-15 16:42:48 +00:00
parent 23f8a8644e
commit d09acc30ff

View File

@ -5560,6 +5560,9 @@ begin
// check unitname
if FilenameIsPascalUnit(NewFilename) then begin
NewUnitName:=ExtractFileNameOnly(NewFilename);
// do not rename the unit if new filename differs from its name only in case
if LowerCase(OldUnitName)=NewUnitName then
NewUnitName:=OldUnitName;
if NewUnitName='' then begin
Result:=mrCancel;
exit;