Save unit as new name is broken in project file
Original Reporter info from Mantis: Ph_B
-
Reporter name:
Original Reporter info from Mantis: Ph_B
- Reporter name:
Description:
Project file is not correctly updated when a new unit is added and renamed before saving.
Steps to reproduce:
Create a new project (Lazarus create project1.* and unit1.* by default)
Add a new unit (named unit2.pas by default) and rename it MyUnit in source code
Save all
All the file are saved with correct name but project1.lpr file is not updated and always refered to unit2, not MyUnit...
Project1 can not be compiled...
Rename unit2 to MyUnit in Project1 and all is right
Save all
Then, add a new unit (named unit2.pas by default) and rename it OtherUnit in source code.
Save all
All the file are saved with correct name, project1.lpr is updated but referred to unit2 not to otherunit.
Lazarus thinks the unit is attached to the project, shortcut Maj+F11 is disabled for the renamed otherunit.
We have to remove the unit from the project and add it again to compile without error.
Additional information:
Tested with Lazarus 1.8.4 (Win32, XUbuntu 18.04 64, Debian 9Xfce 64) and Lazarus 2.0 RC2 r 59373 (Win 32)
this issue could be related to this other one:
https://bugs.freepascal.org/view.php?id=27909
Mantis conversion info:
- Mantis ID: 34568
- Build: 59373
- Platform: Windows, Linux
- Version: 2.0RC2