Supressing nodes unlocks URCap child tree sequence

Steps to reproduce:

  • Have a URCap which add child nodes to itself, and has a locked child sequence, so the URCaps child nodes cannot be moved, deleted or supressed by the program tree toolbar. Verify the child derquence cannot be changed.
  • Supress parent node and save the program.
  • Open a new program
  • Re-open the program with the supressed node.
  • Unsupress the program node, child nodes can now be moved with program toolbar.

Expected Behavior:
Program node children should stay locked when node is unsupressed.

Actual Behavior:
Program node childern lose their sequence lock by performing steps to reproduce. This leads to errors in URCaps which are not written to allow for children nodes to be open to user control

Workaround Suggestion:
Recommend customers avoid saving programs with supressed nodes, alert to issues it causes

Robot Serial Number:
Replicatable in URSim

Affected Version(s):
PS: 5.21.3, tested with URCap written on API 1.13

We could really do with this being addressed as soon as possible, it can cause big issues with some of our URCaps, one of which has been distributed to dozens of customers. Any news on when this might be addressed would be greatly appreciated.

Can you re-lock the parent node in the constructor? I forget if supressing/unsupressing fires the constructor or not. Surely it would fire that node’s openView though, so could you opt to re-lock the parent node on openView? If it’s already locked, who cares. If it got wiped by supressing the node, then re-lock it when it opens back up.

Re-locking it every open view ended up being the correct workaround. It’s simple enough that it mitigates the issue for the time being fortunately, as there is no way to programatically unsupress a program node, meaning openView will always be run when a node is unsupressed.