Finally solve by my self. I just used a class to store the hiden nodes and edges and the position of the nodes on lists.
After restore everythingfrom those list I apply the visual style to make it look as before.
Should be an easier way but I have no clue...