From d7e9e978d08b9cb534006a9b1d7e8a18be61c4d8 Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Wed, 1 Apr 2026 23:52:13 +0800 Subject: [PATCH] Fix inspector switching from scene selection --- editor/src/panels/InspectorPanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/src/panels/InspectorPanel.cpp b/editor/src/panels/InspectorPanel.cpp index 80c8b4f0..67d2b16b 100644 --- a/editor/src/panels/InspectorPanel.cpp +++ b/editor/src/panels/InspectorPanel.cpp @@ -71,6 +71,9 @@ void InspectorPanel::OnDetach() { void InspectorPanel::OnSelectionChanged(const SelectionChangedEvent& event) { Actions::HandleInspectorSelectionChanged(*m_context, event, m_selectedEntityId, m_addComponentPopup); + if (event.primarySelection != 0) { + m_lastExplicitRoute = EditorActionRoute::Hierarchy; + } } void InspectorPanel::Render() {