-
assigned issue to
Cannot change variable in tree/ADD
Issue #387
resolved
This network has an ADD for node State [1]. In this ADD, the option “Change variable” is available for Time in treatment [0]. It should also be available for the root node, Therapy type.
Comments (4)
-
reporter -
The issue is “located” in an “if” clause (TreeAddEditorPanel.java, line 178). When the node has already a subtree it don’t allow to change the root variable. It is important to reconsider if this option should be available or not (but at least it should not arise an Exception).
if (!hasSubTrees && newPosibleRootVariables.size() != 0) { for (Variable variable : treeADD.getVariables()) { if (variable != currentRootVariable && variable != conditionedVariable) { JMenuItem posibleRootVariable = new JMenuItem(variable.getName()); posibleRootVariable.addActionListener(this); posibleRootVariable.setActionCommand(ActionCommands.CHANGE_ROOT_VARIABLE); changeRootVariable.add(posibleRootVariable); } } contextualMenu.add(changeRootVariable); }
-
reporter I don’t know who introduced that restriction or why. Changing the variable should always be allowed, as well as any other edit, at the user’s risk. Undoing is always an option.
Thank you very much, Jorge.
-
- changed status to resolved
- Log in to comment