Unity-Technologies / EditorXR

Author XR in XR
Other
929 stars 167 forks source link

ToolsMenu & MainMenu bug fixes #510

Closed dunity closed 5 years ago

dunity commented 5 years ago

Purpose of this PR

*Change tool-selection behavior when closing/despawning tools via their own UI close-buttons. In these cases, select the selection-tool, rather than the next tool on the stack.

*Fix bug in which the MainMenu button in the ToolsMenu gets stuck displaying the icon and description of the most recently selected tool from the MainMenu.

*Fix bugs that arose from allowing the ToolsMenu to re-select the same active/current tool. (buttons not being removed from the ToolsMenu, and buttons no longer able to be selected).

*Fix bug that caused a rare lock-up case in the ToolsMenu when closing all open tools via the the secondary ToolsMenuButton (the close button).

Testing status

I've tested these fixes using various combinations of actions aimed at reproducing the previous issues, and wasn't able to reproduce the initial cases that would give rise to the bugs.

Technical risk

Low. These changes were relegated to the MainMenu, the ToolsMenu, and the relevant functions in EditorVR.Tools (SelectTool & DespawnTool).

Comments to reviewers

The initial population of all available tools was removed. That initial population was producing a separate bug outside this PR's scope.