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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnVect.Proc.Undo not working as expected
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Jul 12 2016 :  10:59:48  Show Profile  Reply
Hello,

I am using following code for automatically managing undo in TImageEnVect.

ImageEnVect.LayerOptions := [loAllowMultiSelect, loAutoUndoLayerChanges];
ImageEnVect.Proc.UndoLimit := 999;
ImageEnVect.Proc.AutoUndo := True;
ImageEnVect.ForceALTkey := True;


If I move a layer and resize it then then call
ImageEnVect.Proc.Undo()

It will only undo the last action.

If I repeatedly call this it will not have any effect.

Why?

Again if I delete a Layer and then call undo it is not working...Why?

Technically it should work.

Yogi Yang

w2m

USA
1990 Posts

Posted - Jul 13 2016 :  16:13:13  Show Profile  Reply
I added undo to the layers demo and this seems to work with auto undo:
procedure Tfmain.Undo1Click(Sender: TObject);
begin
  ImageEnView1.Proc.Undo();
  ImageEnView1.Proc.ClearUndo;
  Undo1.Enabled := ImageEnView1.Proc.CanUndo;
end;

Undo only seems to work when a layer is moved or resized, but it does not work if a layer is removed.
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: