Question: How do I clear the undo stack from the Draw widget from a widget other than Draw itself?
I have 2 widgets, the OTB Draw widget and another widget that re-loads graphics (Save Session)
When loading a new session via my Save Session widget, it will first remove all graphics from the map, then reload the graphics from the session file. I have to clear the graphics, if I remove the layers outright, it puts Draw into a bad state. This all works fine and good.
I run into problems when I try to reload session/graphics and go back and use the Draw widget. If I had already used Draw, made some graphics, loaded the new session, I end up in a state with the graphics from the session file on my screen (so far, working as expected). When I go back and use Draw and add a new graphic, I lose everything from my loaded session and the graphics that were previously created (but had been removed) show up again. I've verified that I've cleaned out all the graphics layers, the geometry is GONE. The only