VisTrails plugin recording too much informations before state loading action
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Our plugin is nearly complete, however there is an issue when a user loads a ParaView save file. The problem is that a few UndoSets get pushed onto the UndoStack before the aboutToLoadState() signal is emitted, so we end up recording actions we don't want. I can think of two simple solutions for this, but both require very minor changes to the ParaView source.
Solution 1: In the loadState() method at pqApplicationCore.cxx::519, move the emit this->aboutToLoadState(rootElement) call up 5 lines before the pqViews are destroyed. This way we can detect that the state is loading earlier and ignore the changes to the UndoStack.
Solution 2: Add BEGIN_UNDO_EXCLUDE() and END_UNDO_EXCLUDE() calls around the code that destroys the pqViews near pqApplicationCore.cxx::511 ~ 518. This shouldn't cause any problems in ParaView because the UndoStack is cleared when the ProxyManager loads the state anyway.
We have chosen solution 2