Paint refresh on Document set

Hi,

Is there any way to stop the view from forcing a repaint when set the property GoView.Document?
Thanks, Tyler

Why would you want to do that?

Our application has moved its model outside of the Document object, and we were trying to do double-buffering with the view. More specifically, we want to populate GoDocument-2 while GoDocument-1 is still being displayed, and we don’t want flicker when we set the view to GoDocument-2. We want the view set up correctly, with GoDocument-2 as its data source, until we do other assorted rendering behavior, and only then do we want a repaint.

In order to eliminiate the flicker we call BeginUpdate() before we swap documents, and then EndUpdate() afterwards, but changing documents still causes a screen repaint, which causes the screen to flicker black.
-Tyler

Have you tried 1 GoDocument with 2 GoLayers, and just toggling the visibility of the layers?

I hadn’t thought of that.

For some reason our application runs out of memory faster when we do a GoDocument.Clear() and then repopulate it, forcing a redraw.
If we instantiate a new GoDocument, fill it, and then switch the GoDocument the View points to, the application doesn't run out of memory as quickly. This really speaks to some sort of resource leak, but we haven't been able to nail it down.
-Tyler

Actually, on second thought… I don’t understand why you see the screen flicker to black when switching documents. GoDiagram does suspends updates while it does all the work of switching layers, etc.

And I happen to have an old test program here that is 1 view / 2 docs. I don't see any flicker when I switch.