Forum > Editor

Vesion 2.2.2. - "not saved unit" shall not be part of the uses

(1/1)

Nicole:
Is this my fault or a small issue of the IDE?

- hit the icon new unit and "unit 1" is created
- write something, what do do not enjoy after a while
- close the unit1 and chose "do not save"
- start the project
- read the error message "unit 1 not found"

=> it would be great, if the not-wanted unit1 would be deleted again from the uses list at the click "no, I do not want to save it".

rvk:

--- Quote from: Nicole on August 25, 2022, 08:43:54 am ---=> it would be great, if the not-wanted unit1 would be deleted again from the uses list at the click "no, I do not want to save it".

--- End quote ---
Yes, that would be ideal but it's a bit tricky. It would mean rollback of source code but that can give troubles.
For instance, if you add Unit1 and Unit2 and save Unit2 but don't save Unit1.
The source of .lpr is already adjusted for Unit1 and Unit2.

If you delete the unit via the Project Inspector it does update the .lpr correctly.
So the logic-code is there, but Lazarus would need to detect the unit was not actually there before and remove it on non-save.

It doesn't happen often (I guess). But if it bothers you, you could put in a bug-report or feature request.
And no... it's not your fault  ;)

Navigation

[0] Message Index

Go to full version