View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037207 | Patches | IDE | public | 2020-06-12 22:14 | 2020-06-30 21:15 |
Reporter | Sven Barth | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | reopened | ||
Platform | x86_64 | OS | Windows NT | ||
Product Version | 2.1 (SVN) | ||||
Summary | 0037207: Object Inspector does not respect absence of paRevertable of property editor | ||||
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? | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r63437 | ||||
LazTarget | - | ||||
Widgetset | |||||
Attached Files |
|
|
propedit-revertable.patch (820 bytes)
Index: components/ideintf/objectinspector.pp =================================================================== --- components/ideintf/objectinspector.pp (revision 63342) +++ components/ideintf/objectinspector.pp (working copy) @@ -1580,7 +1580,7 @@ isExcept := false; Editor:=CurRow.Editor; prpInfo := nil; - if CompEditDsg<>nil then begin + if (CompEditDsg<>nil) and (paRevertable in Editor.GetAttributes) then begin SetLength(OldUndoValues, Editor.PropCount); prpInfo := Editor.GetPropInfo; if prpInfo<>nil then @@ -1611,7 +1611,7 @@ end; // add Undo action - if (not isExcept) and (CompEditDsg<>nil) then + if (not isExcept) and (CompEditDsg<>nil) and (paRevertable in Editor.GetAttributes) then begin for i := 0 to Editor.PropCount - 1 do begin |
|
Applied, thanks. |
|
Thank you for applying! But can it be that the commit message is incorrect? You wrote: IdeIntf: Do not undo paRevertable property editor in Object Inspector. Issue 0037207, patch from Sven Barth. Shouldn't it be something like: IdeIntf: Do not undo property editor without paRevertable in Object Inspector. Issue 0037207, patch from Sven Barth. After all paRevertable is set by default and only without it undo should not be possible. ;) Note: I don't know whether editing commit messages is enabled for the Lazarus repo. It is for the FPC repo. |
|
> Note: I don't know whether editing commit messages is enabled for the Lazarus repo. It is for the FPC repo. It is. |
|
Oops yes. I must figure out how to change the message with Subversion client. I use git-svn link for my normal development and my Subversion knowledge is limited. |
|
@Juha svn propset -r N --revprop svn:log "new log message" URL or svn propset -r N --revprop svn:log --file messagefilename URL N would be the number of the revison. You can skip the URL if you do this form with the lazarus folder (which is under svn control) |
|
$ svn propset -r 63437 --revprop svn:log "IdeIntf: Do not undo property editor without paRevertable in Object Inspector. Issue 0037207, patch from Sven Barth." and it looks I succeeded. Got: "property 'svn:log' set on repository revision 63437" Please check. |
|
Looks good. :) You may resolve again. Thank you! |
|
Resolving ... :) |
|
And closing. :D |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-06-12 22:14 | Sven Barth | New Issue | |
2020-06-12 22:14 | Sven Barth | File Added: testpkg.zip | |
2020-06-12 22:14 | Sven Barth | File Added: propedit-revertable.patch | |
2020-06-24 12:08 | Juha Manninen | Assigned To | => Juha Manninen |
2020-06-24 12:08 | Juha Manninen | Status | new => assigned |
2020-06-24 12:08 | Juha Manninen | Status | assigned => resolved |
2020-06-24 12:08 | Juha Manninen | Resolution | open => fixed |
2020-06-24 12:08 | Juha Manninen | Fixed in Revision | => r63437 |
2020-06-24 12:08 | Juha Manninen | LazTarget | => - |
2020-06-24 12:08 | Juha Manninen | Note Added: 0123551 | |
2020-06-27 17:01 | Sven Barth | Status | resolved => assigned |
2020-06-27 17:01 | Sven Barth | Resolution | fixed => reopened |
2020-06-27 17:01 | Sven Barth | Note Added: 0123628 | |
2020-06-27 22:37 | Bart Broersma | Note Added: 0123637 | |
2020-06-28 10:52 | Juha Manninen | Note Added: 0123646 | |
2020-06-28 16:12 | Bart Broersma | Note Added: 0123651 | |
2020-06-28 16:13 | Bart Broersma | Note Edited: 0123651 | View Revisions |
2020-06-30 11:54 | Juha Manninen | Note Added: 0123678 | |
2020-06-30 11:54 | Juha Manninen | Status | assigned => feedback |
2020-06-30 16:10 | Sven Barth | Note Added: 0123682 | |
2020-06-30 16:10 | Sven Barth | Status | feedback => assigned |
2020-06-30 18:19 | Juha Manninen | Status | assigned => resolved |
2020-06-30 18:19 | Juha Manninen | Note Added: 0123686 | |
2020-06-30 21:15 | Sven Barth | Status | resolved => closed |
2020-06-30 21:15 | Sven Barth | Note Added: 0123687 |