diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-29 22:43:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-29 22:43:41 +0200 |
commit | e1dc8e4e991c62e65636ef21b3e8baab9a9db733 (patch) | |
tree | e4495aee9793fede6bb49187f3f52d71f87dcd57 | |
parent | 4115e6d1795270dc0012a6328c951e73dfd24c9a (diff) | |
parent | 9bb65399d9779b90678d637a506633af13dcb611 (diff) |
Merge pull request #22522 from DualMatrix/debugging_the_debugger_3
Fixed debugger showing wrong name for Objects.
-rw-r--r-- | editor/script_editor_debugger.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index f13d3f5287..dc6ba29925 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -577,12 +577,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da String hs = String(); if (v.get_type() == Variant::OBJECT) { + v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); h = PROPERTY_HINT_OBJECT_ID; - v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id()); - String s = v; - s = s.replace("[", ""); - hs = s.get_slice(":", 0); - v = s.get_slice(":", 1).to_int(); + hs = "Object"; } variables->add_property("Locals/" + n, v, h, hs); @@ -599,12 +596,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da String hs = String(); if (v.get_type() == Variant::OBJECT) { + v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); h = PROPERTY_HINT_OBJECT_ID; - v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id()); - String s = v; - s = s.replace("[", ""); - hs = s.get_slice(":", 0); - v = s.get_slice(":", 1).to_int(); + hs = "Object"; } variables->add_property("Members/" + n, v, h, hs); @@ -621,12 +615,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da String hs = String(); if (v.get_type() == Variant::OBJECT) { + v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); h = PROPERTY_HINT_OBJECT_ID; - v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id()); - String s = v; - s = s.replace("[", ""); - hs = s.get_slice(":", 0); - v = s.get_slice(":", 1).to_int(); + hs = "Object"; } variables->add_property("Globals/" + n, v, h, hs); |