The "New Parent Node" action creates a node as a parent of one or more selected nodes. If more than one node is selected, the selected nodes must all have the same parent -- this restriction is imposed to make the action easier to understand and to undo manually, and could potentially be removed when we get automated undo. The root node must not be one of the selected nodes.
Three new resource strings are required. In Resources_en.properties, I used the following:
new_parent = New Parent Node
cannot_add_parent_diff_parents = Cannot add parent node if selected nodes have different parents
cannot_add_parent_to_root = Cannot add parent node to the root node
I added the following key binding to freemind.properties:
keystroke_add_parent = shift INSERT
I find this action useful when I need to add an extra level of grouping in the middle of an existing hierarchy. It is quicker than adding a new node at the same level and then cutting-and-pasting the child nodes. The code simply performs these actions in sequence, after validating the selected nodes.
Log in to post a comment.