Drag'n'dropping a node onto its parent node in the scene tree selects it in the (2D) Editor, but not the Inspector
Tested versions
- Reproducible in 4.3-stable
System information
Godot v4.3.stable - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 580 Series (RADV POLARIS10) - AMD Ryzen 7 7700X 8-Core Processor (16 Threads)
Issue description
When a node is selected in the scene tree, this updates the view in the 2D Editor and the Inspector to highlight the node there as well. Under very specific circumstances, this update does not happen fully. In this case: drag'n'dropping a node onto its parent to put it as the lowest of the children highlights the node to be highlighted in the 2D Editor, but the Inspector does not update accordingly.
Steps to reproduce
- Create a scene with a root node and two distinguishable child nodes (eg. a Container with a label and a button)
- Select the lower node in the scene tree
- drag the upper node onto its parent in the scene tree
Minimal reproduction project (MRP)
N/A
While reporting #97702 I noticed another odd thing that I'm not sure counts as its own bug and fits in with this one:
multi-selecting nodes of one kind (via ctrl or shift click) does not update the inspector, even when the focused element in the scene tree changes.
After a bit of investigation I noticed that is is caused by the change made here : https://github.com/godotengine/godot/pull/61162
And specifically this : https://github.com/godotengine/godot/blob/38775731e8494a28deddc3febda895679f49fd6e/editor/scene_tree_dock.cpp#L73-L75
It is not relevant anymore afaik, because at the time of the above PR the node was edited in the inspector when the mouse button was pressed, unlike now where it's when it's released.
Looks like just removing this avoid the issue. But maybe there's more to it ? What do you think ? cc @KoBeWi
Removing this will make the dragged node get selected when you drag it into the inspector. Have a node with NodePath property, drag another node to the property. The dragged node will be selected and inspector switches out of the node with the property. It's unwanted behavior.
It looks like a fix for the issue may still be desired here, just not the one proposed as it will break other behaviour. Leaving this open and assigning to a project for assessment.