GvNodeMaster Undo



  • On 15/10/2017 at 09:43, xxxxxxxx wrote:

    Hello, I would like to ask if it's possible to have a more informations about how undo work inside a GvNodeMaster?

    Should I call GvNodeMaster::GetDocument() ::Start/EndUndo as we do in other context?
    For creating a Node/Port should I use GvNodeMaster::AddUndo() before or after?
    For removing Node/Port should I use GvNodeMaster::AddUndo() before or after?
    For set a node paremeter should I use GvNodeMaster::GetDocument::AddUndo() or GvNodeMaster::AddUndo() ?
    For connect/disconnect should I use document GvNodeMaster::GetDocument::AddUndo() or GvNodeMaster::AddUndo()? Before or After the action?

    Thanks in advance.



  • On 16/10/2017 at 02:11, xxxxxxxx wrote:

    Hi,

    no, you do not need to call StartUndo()/EndUndo(), in fact this is done internally by GvNodeMaster::AddUndo().
    Additionally GvNodeMaster::AddUndo() is not much more than a AddUndo(UNDOTYPE_CHANGE), so it needs to be called before any changes.



  • On 16/10/2017 at 02:49, xxxxxxxx wrote:

    Thanks a lot !


Log in to reply