ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Proc.AutoUndo does not work in my app

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Feb 20 2024 : 15:45:03
Please look at this test project:

attach/PeterPanino/2024220153514_AutoUndoTest.zip
76.52 KB

0. In FormCreate, AutoUndo is set:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnView1.Proc.UndoLimit := 99;
  ImageEnView1.Proc.AutoUndo := True;
end;


1. Load an image file

2. Change the image with the Colors button

3. Change the image with the Edit button

4. Click the Undo button TWICE: Only the last edit action is undone!

Shouldn't clicking the Undo button TWICE undo the LAST TWO image changes? How can this be achieved?

The demos do not have an example with
ImageEnView1.Proc.AutoUndo := True;


The documentation says:

"TImageEnProc.AutoUndo
When true, all image processing and load operations will automatically call SaveUndo"

ImageEnVersion: 13.0.0
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 22 2024 : 13:10:51
Yes, I agree. It only works that way to avoid breaking old code for users. I have added a note to Undo/Redo.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Feb 21 2024 : 23:10:19
Hi Nigel,

Thanks, now the multiple Undo/Redo works.

IMO, you should explicitly mention this MULTIPLE Undo/Redo feature in the documentation.
xequte Posted - Feb 21 2024 : 16:38:57
Hi

Please change your code to:

ImageEnView1.Proc.Undo(True);
...
ImageEnView1.Proc.Redo(True);


https://www.imageen.com/help/TImageEnProc.Undo.html


Nigel
Xequte Software
www.imageen.com