Undo Problem

Dear,

We have facility hide/show GoListgroup in Graph Node through up image in Graph node.Graph Node appear like below:

                       (Fig-1)

Step1: Click the up image in graph node then hide GoListGroup in graph node,graph node appear like below:

(Fig-2)
Step2: Click the down Image in graph node then show GOListgroup in graph node,graph node appear like (Fig-1).

Step3: Peform undo operation,then graph node appear like this (Fig-2 )

Step4: Again Peform undo operation,then graph node appear like this (Fig-1).

Step 5:Click the up image in graph node then hide GoListGroup in graph node,graph node wii be appear like (Fig-2).But graph node appear Like
(Fig-1),means no effect on graph node.

Problem occures only that condition.

For Hide GoList Group, We used that Code:

ScrollingListGroup gList = this.ListGroup as ScrollingListGroup;
myListGroup = null;
Remove(gList);

For Show list Group,We Used that code:

private GoObject myListGroup;

Remove(myListGroup);

        myListGroup = gObj;
        myListGroup.Selectable = false;
        myListGroup.Editable = false;
        myListGroup.Location = new PointF(this.Label.Location.X, this.Label.Location.Y + this.NodeFigure.Height);
        Add(myListGroup);

Pl.Give solution.

regards

sudhanshu

When showing, why do you call Remove(myListGroup) first? That doesn’t seem to make sense.

I suspect the problem is that you are making changes to objects when they are not part of the GoDocument, but are expecting the document to magically remember those changes anyway.

Changes cannot be recorded for undo/redo purposes unless the GoObject is part of a GoDocument. (And the GoDocument has to have a GoUndoManager that is enabled, of course.)

Dear,

we have remove line
Remove(myListGroup);

but,problem occured ,after perform the undo the operation.
when we have no perform the undo operation,then every thing is right.
with out GoUndoManger in GoDocument,How to perform undo operation.

regards
sudhanshu