How to remove a node from a script?

Help
Anonymous
2012-10-24
2013-04-11
  • Anonymous - 2012-10-24

    Hi,

    I've tried successfully to modify nodes, but I cannot succeed removing (deleting) any node with a script:

    None of the 2 functions coming in following code works (no warning or error message)

    print "Child node: '"+aChildNode.getShortText(C)+"\n";
    print "Parent node: '"+parentNode.getShortText(C)+"\n";
    aChildNode.removeFromParent();
    parentNode.remove(aChildNode);

    both variables are freemind.modes.mindmapmode.MindMapNodeModel type

    Any idea to help? Is there any limitation preventing script to delete nodes?

     
  • Christian Foltin

    Hi,

    the only methods you should call from a script to alter the map are those of MindMapActions, where a "c.deleteNode(node)" is contained. It will update the view and the model and can be undone.

    HTH, Chris

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks