@@ -300,7 +300,9 @@ void ScriptEditorDebugger::clear_inspector(bool p_send_msg) {
300300}
301301
302302void ScriptEditorDebugger::_remote_object_selected (ObjectID p_id) {
303- emit_signal (SNAME (" remote_object_requested" ), p_id);
303+ Array arr;
304+ arr.append (p_id);
305+ emit_signal (SNAME (" remote_objects_requested" ), arr);
304306}
305307
306308void ScriptEditorDebugger::_remote_objects_edited (const String &p_prop, const TypedDictionary<uint64_t , Variant> &p_values, const String &p_field) {
@@ -439,16 +441,10 @@ void ScriptEditorDebugger::_msg_scene_scene_tree(uint64_t p_thread_id, const Arr
439441
440442void ScriptEditorDebugger::_msg_scene_inspect_objects (uint64_t p_thread_id, const Array &p_data) {
441443 ERR_FAIL_COND (p_data.is_empty ());
444+ EditorDebuggerRemoteObjects *objs = inspector->set_objects (p_data);
445+ if (objs && EditorDebuggerNode::get_singleton ()->match_remote_selection (objs->remote_object_ids )) {
446+ EditorDebuggerNode::get_singleton ()->stop_waiting_inspection ();
442447
443- TypedArray<uint64_t > ids;
444- for (const Array arr : p_data) {
445- ERR_FAIL_COND (arr.is_empty ());
446- ERR_FAIL_COND (arr[0 ].get_type () != Variant::INT);
447- ids.append (arr[0 ]);
448- }
449-
450- if (EditorDebuggerNode::get_singleton ()->match_remote_selection (ids)) {
451- EditorDebuggerRemoteObjects *objs = inspector->set_objects (p_data);
452448 emit_signal (SNAME (" remote_objects_updated" ), objs);
453449 }
454450}
@@ -881,7 +877,7 @@ void ScriptEditorDebugger::_msg_request_quit(uint64_t p_thread_id, const Array &
881877 _stop_and_notify ();
882878}
883879
884- void ScriptEditorDebugger::_msg_remote_nodes_clicked (uint64_t p_thread_id, const Array &p_data) {
880+ void ScriptEditorDebugger::_msg_remote_objects_selected (uint64_t p_thread_id, const Array &p_data) {
885881 ERR_FAIL_COND (p_data.is_empty ());
886882 EditorDebuggerRemoteObjects *objs = inspector->set_objects (p_data);
887883 if (objs) {
@@ -892,7 +888,7 @@ void ScriptEditorDebugger::_msg_remote_nodes_clicked(uint64_t p_thread_id, const
892888 }
893889}
894890
895- void ScriptEditorDebugger::_msg_remote_nothing_clicked (uint64_t p_thread_id, const Array &p_data) {
891+ void ScriptEditorDebugger::_msg_remote_nothing_selected (uint64_t p_thread_id, const Array &p_data) {
896892 EditorDebuggerNode::get_singleton ()->stop_waiting_inspection ();
897893
898894 emit_signal (SNAME (" remote_tree_clear_selection_requested" ));
@@ -973,8 +969,8 @@ void ScriptEditorDebugger::_init_parse_message_handlers() {
973969 parse_message_handlers[" servers:profile_frame" ] = &ScriptEditorDebugger::_msg_servers_profile_frame;
974970 parse_message_handlers[" servers:profile_total" ] = &ScriptEditorDebugger::_msg_servers_profile_total;
975971 parse_message_handlers[" request_quit" ] = &ScriptEditorDebugger::_msg_request_quit;
976- parse_message_handlers[" remote_nodes_clicked " ] = &ScriptEditorDebugger::_msg_remote_nodes_clicked ;
977- parse_message_handlers[" remote_nothing_clicked " ] = &ScriptEditorDebugger::_msg_remote_nothing_clicked ;
972+ parse_message_handlers[" remote_objects_selected " ] = &ScriptEditorDebugger::_msg_remote_objects_selected ;
973+ parse_message_handlers[" remote_nothing_selected " ] = &ScriptEditorDebugger::_msg_remote_nothing_selected ;
978974 parse_message_handlers[" remote_selection_invalidated" ] = &ScriptEditorDebugger::_msg_remote_selection_invalidated;
979975 parse_message_handlers[" show_selection_limit_warning" ] = &ScriptEditorDebugger::_msg_show_selection_limit_warning;
980976 parse_message_handlers[" performance:profile_names" ] = &ScriptEditorDebugger::_msg_performance_profile_names;
@@ -1956,6 +1952,7 @@ void ScriptEditorDebugger::_bind_methods() {
19561952 ADD_SIGNAL (MethodInfo (" set_execution" , PropertyInfo (" script" ), PropertyInfo (Variant::INT, " line" )));
19571953 ADD_SIGNAL (MethodInfo (" clear_execution" , PropertyInfo (" script" )));
19581954 ADD_SIGNAL (MethodInfo (" breaked" , PropertyInfo (Variant::BOOL, " reallydid" ), PropertyInfo (Variant::BOOL, " can_debug" ), PropertyInfo (Variant::STRING, " reason" ), PropertyInfo (Variant::BOOL, " has_stackdump" )));
1955+ ADD_SIGNAL (MethodInfo (" remote_objects_requested" , PropertyInfo (Variant::ARRAY, " ids" )));
19591956 ADD_SIGNAL (MethodInfo (" remote_objects_updated" , PropertyInfo (Variant::OBJECT, " remote_objects" )));
19601957 ADD_SIGNAL (MethodInfo (" remote_object_property_updated" , PropertyInfo (Variant::INT, " id" ), PropertyInfo (Variant::STRING, " property" )));
19611958 ADD_SIGNAL (MethodInfo (" remote_window_title_changed" , PropertyInfo (Variant::STRING, " title" )));
0 commit comments