mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Properly inspect old remote selection
This commit is contained in:
parent
9edc290328
commit
139c406558
3 changed files with 14 additions and 1 deletions
|
@ -404,7 +404,8 @@ void EditorDebuggerNode::_notification(int p_what) {
|
|||
|
||||
EditorRunBar::get_singleton()->get_pause_button()->set_disabled(false);
|
||||
// Switch to remote tree view if so desired.
|
||||
auto_switch_remote_scene_tree = (bool)EDITOR_GET("debugger/auto_switch_to_remote_scene_tree");
|
||||
remote_scene_tree->set_new_session();
|
||||
auto_switch_remote_scene_tree = EDITOR_GET("debugger/auto_switch_to_remote_scene_tree");
|
||||
if (auto_switch_remote_scene_tree) {
|
||||
SceneTreeDock::get_singleton()->show_remote_tree();
|
||||
}
|
||||
|
|
|
@ -374,6 +374,16 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
|
|||
scroll_to_item(scroll_item, false);
|
||||
}
|
||||
|
||||
if (new_session) {
|
||||
// Some nodes may stay selected between sessions.
|
||||
// Make sure the inspector shows them properly.
|
||||
if (!notify_selection_queued) {
|
||||
callable_mp(this, &EditorDebuggerTree::_notify_selection_changed).call_deferred();
|
||||
notify_selection_queued = true;
|
||||
}
|
||||
new_session = false;
|
||||
}
|
||||
|
||||
last_filter = filter;
|
||||
updating_scene_tree = false;
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ private:
|
|||
|
||||
TypedArray<uint64_t> inspected_object_ids;
|
||||
int debugger_id = 0;
|
||||
bool new_session = false;
|
||||
bool updating_scene_tree = false;
|
||||
bool scrolling_to_item = false;
|
||||
bool notify_selection_queued = false;
|
||||
|
@ -91,6 +92,7 @@ public:
|
|||
|
||||
virtual Variant get_drag_data(const Point2 &p_point) override;
|
||||
|
||||
void set_new_session() { new_session = true; }
|
||||
void update_icon_max_width();
|
||||
String get_selected_path();
|
||||
ObjectID get_selected_object();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue