Object Inspector does not respect absence of paRevertable of property editor
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
When setting a new value in the Object Inspector it always also creates an undo item even if the property editor of the selected property does not specify the paRevertable value in its GetAttributes (normally it is set, because TPropertyEditor sets it).
Steps to reproduce:
- Install the attached package
- Place a TTestClass on a form
- Change the NonRevertableProp to something else
(- If not using docked form editor: select the TTestClass component on the form, otherwise the undo actions of the source editor are used)
- Use Ctrl+Z to undo the change <- this should not have been possible
Solution:
- apply attached patch to Lazarus
- repeat above steps
- Use Ctrl+Z to undo the change <- will not undo the change, but will undo whatever was the previous undo item
Additional information:
The attached patch fixes the above mentioned problem.
It might however be confusing if the IDE executes the previous undo item (e.g. if the previous action was to place the component on the form the component will be removed again), so maybe a kind of NOP undo item should be added, that does nothing when directly executed, but gets replaced by the next undo item?
Mantis conversion info:
- Mantis ID: 37207
- OS: Windows NT
- OS Build: 10
- Build: 63342
- Platform: x86_64
- Version: 2.1 (SVN)
- Fixed in revision: r63437 (#5dbd8cdf)