"Add subtree" and "Split interval" consecutively in TreeADDs does not refresh the tree

Create issue
Issue #154 resolved
Manuel Luque created an issue

While editing a TreeADD in an MPAD, if the user selects consecutively the options "Add subtree", selects a numeric variable, and click on "Split interval" for that variable, then the TreeADD shown in the dialog is not updated. That forces the user to click on "Ok" (what closes the dialog) and reopen it again to continue editing.

This problem can be reproduced with the attached network, if the user edits the node the utility of "Cost [0]", select "Add subtree" in "Therapy = combined therapy", select "Time in treatment [0]", and then it clicks on "Split interval" for "Time in treatment [0] = [0.0,infinity)".

Comments (2)

  1. Jorge Pérez

    Fixed issue. Commented the following lines of code:

    //parenthPath is always null at this point
    jTree.expandPath((TreePath) parentPath);
    
    // The notification is already done with the notifyTreeStructureChanged method (some lines above this line)
    model.notifyTreeInsert(path, newTreeADD);
    
    // The tree is already expanded in the for clause (some lines above this sentence)
    jTree.expandPath(path);
    jTree.expandPath(path.pathByAddingChild(newTreeADD));
    
  2. Log in to comment