Ty. I applied your suggestions and everything seems to work except for the 4rth Fill on the Redo. I changed the numbers on the Redo, still no success. Here is what I did:
I changed the Max Index to 1 on the Undo.
I put a CanvasPinWh.Clear and a TinyDB1.ClearAll on my ResetPinWh Button.
I really hate to clear the Tiny DB1. Do you think I can remove that Block?
Ty so much for that file, as well as the first one. If I can somehow tweak the numbers on the Redo, I think it will all work quite well. Since the Redo is not filling the 4rth Fill, I wonder if the Original CanvasPinWh.Touched needs to have its numbers tweaked. Honestly, I am so nervous to change anything...you have gotten me this far.... ty you again.
I don't bother with TinyDB in my sample, because I am ony doing a single session.
If I were doing multiple sessions that I wanted to keep, I would need separate TinyDB tags for them, and I would need to keep their Undo stacks under those tags.
By the way, I made no provision for erasing those image files, because storage is cheap and life is short.
I do use the TinyDB on my later pages, for when I show the Quilt Block again, and when I TempSave and TempLoad. I took it off and tried the Undo, and the last 2 Fills got deleted again, like before. So, I refreshed the computer screen, and all was fine. So, now the only thing left is to figure out the Redo issue.
Ok, so I changed the UndoIndex to 1, and the Undo's are still working, but the Redo is now deleting everything on the 4rth Click. I wonder if it's because I am using that Extension??
For the Image Deletions.... I do have a Button that says "Delete All Temp Memory". It deletes the TinyDB memory. Do you think I can add a Canvas.Clear to that Button to clear the Images in Storage? ....NO, not Canvas.Clear... that just clears the Canvas.
Yes, I was confusing them. Ty for pointing that out so clearly.
I inserted your Redo Blocks into my project, clicked to fill 4 times, Clicked Undo 4 times, clicked Redo 4 times but, the 4rth Redo still clears the canvas. So, I changed the Redo If Statement to say > = 1, instead of > 0. And the 4rth
Redo kept the previous 3 fills in tact, but it still would not fill the 4rth area.
When you say “capture one image”, I am not sure what you mean. The Pinwheel Block Image is set as a Background Image on the Canvas (this was set on the Designer Tab).
But, that same Pinwheel image is also set as the background image in the Screen.Initialize event. Could this double setting of an image cause issues with the Stack?
The Undo Click event does not change the contents of the stack.
My only guess is that the extension's flood fill is not reflected in the image files saved in the stack.
For debugging, try adding a List Picker whose Elements are loaded from the stack, and when selected, they are loaded into the Canvas Background for display.
I don't support extensions.
The sample app I supplied works okay without extensions,