The routines that sub-routine tasks are set to run are sometimes set automatically. This can lead to accidentally executing something.
Case 1:
Add 2 routines (Routine 1 and Routine 2) with different tasks
Add a new routine (Routine 3) with sub-routine task, and select "Routine 1"
Delete Routine 1
(Running Routine 3 at this point does nothing and gives the error: Sub-Routine::Invalid routine name or no tasks)
Edit Routine 3, don't do anything, and exit.
Run Routine 3. This executes Routine 2 despite it never being selected. (Though the user can see that the sub-routine task in Routine 3 was set to execute Routine 2.)
Case 2:
When there are no other routines, add a new routine with sub-routine task
Add a second routine with some task
Execute the first routine. It will execute the second routine despite it never being selected.
This also happens whenever a sub-routine task is added and other routines exist. But in this case the user can easily see it and select the correct routine for sub-routine task.
This problem could be fixed if there was a "None" option in the sub-routine task's dropdown menu. It should default to this option when first created, and it should switch to this option when the routine it previously referenced is deleted.
A related usability improvement would be to give a confirmation popup when the user tries to delete a routine that is referenced by some sub-routine. This would be like the note the Godot editor gives when trying to delete a script that is used somewhere. But this is less important than preventing accidental execution.
The routines that sub-routine tasks are set to run are sometimes set automatically. This can lead to accidentally executing something.
Case 1:
Sub-Routine::Invalid routine name or no tasks
)Case 2:
This also happens whenever a sub-routine task is added and other routines exist. But in this case the user can easily see it and select the correct routine for sub-routine task.
This problem could be fixed if there was a "None" option in the sub-routine task's dropdown menu. It should default to this option when first created, and it should switch to this option when the routine it previously referenced is deleted.
A related usability improvement would be to give a confirmation popup when the user tries to delete a routine that is referenced by some sub-routine. This would be like the note the Godot editor gives when trying to delete a script that is used somewhere. But this is less important than preventing accidental execution.