GoControl Object with Undo/Redo manager


i have problem using GoUndoManager with object containing GoControl. In my specific case, i use a WebBrowser control in a GoObject (like http://www.nwoods.com/forum/uploads/BrowserBalloon.cs). I can do anything to my object (add, delete, copy, paste, ...even an undo/redo after moving or resizing my object) everything works fine. But if i click "Undo" after i add my object to the view, only the GoObject part of my object is deleted from the GoView, the control still there but seems alone (not attached in my GoObject because my GoObject does not exist anymore).
Probably, i miss something here which i need to call or clean to remove the control part of my object in the specific case of an Undo.
PS:If user select the my GoObject and press "Delete", the GoObject and the GoControl is deleted like expectation.

Looks like I can reproduce this… will look at it today.

ok… GoControl uses OnLayerChanged calls to catch when newlayer = null, and it calls DisposeControl to clean up the control.

However, when in undo/redo, the set layer code doesn’t make calls to OnLayerChanged (to avoid shoot-yourself-in-the-foot side-effects in undo/redo).

So, we’ve looked at this carefully and decided the way to fix this is to make an exception when in undo/redo for GoControl and go ahead and call OnLayerChanged.

The good news is that will fix the problem, and we can make that change in the upcoming 4.1. The bad news is I don’t see any neat and tidy way to work around this in an earlier version. (you might be able to watch for DocumentChanged events and call GoControl.DisposeControl when you see a WebBrowser being deleted… haven’t tried that.)

Thanks for the fix, do you have a release time frame for v4.1?

Around April 12th, which is the release date of Visual Studio 2010.