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
 Undo with multipage image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jeffp

USA
66 Posts

Posted - Feb 02 2016 :  10:06:55  Show Profile  Reply
I'm using a TImageMView with a TImageEnVect to create an image editor for multipage images like TIFFs.

The TImageMView shows all the page thumbs and as one is selected it shows in the TImageEnVect.

That said, I'm trying to get the Undo to work between pages. That is if I select page 1 and do some edits on the TImageEnVect, and then move to page 2, once I run undo it changes page 2 back to what was in the undo buffer for page 1. Not what I want.

Is there a way to keep an undo list for each page in the TImageMView so when I'm on page 1 the undo list only applies to things I changed on page 1, and them when I move to page 2 the same thing.

Thanks.



jp

w2m

USA
1990 Posts

Posted - Feb 02 2016 :  10:23:50  Show Profile  Reply
Are you calling ImageEnVect.Proc.SaveUndo or ImageEnMView.Proc.Undo?
I suspect you are doing the former. So use ImageEnMView.Proc.SaveUndo and ImageEnMView.Proc.Undo.

If you wish to be able to undo image changes as well as undo object changes then I you suggest you change your GDI to use MDI or a PageControl containing a TImageEnVect so that each frame is loaded into a separate page. (In other words, use one ImageEnVect for each frame so undo will only affect the active ImageEnVect. When you change the active ImageEnVect do a ClearAllUndo so that undo will only function on one ImageEnVect at a time.

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: