diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-20 14:45:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 14:45:21 +0200 |
commit | c19dc39630f16ec699be89b0fd39ed64c71fd08d (patch) | |
tree | 83cb0e15f65bbfb370ccd8d71cdea0e3a84658d6 | |
parent | 7235f48690b67c7e67814137685fbb9c60b13643 (diff) | |
parent | 54286e1711ba08a474a18a3febfbbe3c880d23e3 (diff) |
Merge pull request #22201 from DualMatrix/error_spam_2_electric_boogaloo
Fixed error spam in remote debugger
-rw-r--r-- | core/script_debugger_remote.cpp | 11 | ||||
-rw-r--r-- | editor/script_editor_debugger.cpp | 14 |
2 files changed, 15 insertions, 10 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 704b4d1fdc..fe1dc2cdd1 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -662,11 +662,14 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { prop.push_back(Variant()); } else { prop.push_back(pi.hint); - if (res.is_null() || res->get_path().empty()) - prop.push_back(pi.hint_string); - else - prop.push_back(String("RES:") + res->get_path()); + prop.push_back(pi.hint_string); prop.push_back(pi.usage); + if (!res.is_null()) { + var = String("PATH") + res->get_path(); + } else if (var.get_type() == Variant::STRING) { + var = String("DATA") + var; + } + prop.push_back(var); } send_props.push_back(prop); diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index b32120dea5..cc477314e9 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -492,17 +492,19 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da pinfo.usage = PropertyUsageFlags(int(prop[4])); Variant var = prop[5]; - String hint_string = pinfo.hint_string; - if (hint_string.begins_with("RES:") && hint_string != "RES:") { - String path = hint_string.substr(4, hint_string.length()); - var = ResourceLoader::load(path); - } - if (is_new_object) { //don't update.. it's the same, instead refresh debugObj->prop_list.push_back(pinfo); } + if (var.get_type() == Variant::STRING) { + String str = var; + var = str.substr(4, str.length()); + + if (str.begins_with("PATH")) + var = ResourceLoader::load(var); + } + debugObj->prop_values[pinfo.name] = var; } |