summaryrefslogtreecommitdiffstats
path: root/editor/debugger/editor_debugger_inspector.cpp
diff options
context:
space:
mode:
authorJummit <jummit@web.de>2021-09-15 18:04:44 +0200
committerJummit <jummit@web.de>2021-09-15 19:46:53 +0200
commit1260735ee6bd2039a0f1aefb3515e30878dabf31 (patch)
treeb93d6ca84bc47332f438357e4e260e2826e0a2e7 /editor/debugger/editor_debugger_inspector.cpp
parenta5c299630d865ca61a1943c9ce38936f9ac18063 (diff)
downloadredot-engine-1260735ee6bd2039a0f1aefb3515e30878dabf31.tar.gz
Show correct debug tooltips for existing variables
Diffstat (limited to 'editor/debugger/editor_debugger_inspector.cpp')
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index a1eb71235c..ac302841b8 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -265,5 +265,11 @@ void EditorDebuggerInspector::clear_stack_variables() {
}
String EditorDebuggerInspector::get_stack_variable(const String &p_var) {
- return variables->get_variant(p_var);
+ for (Map<StringName, Variant>::Element *E = variables->prop_values.front(); E; E = E->next()) {
+ String v = E->key().operator String();
+ if (v.get_slice("/", 1) == p_var) {
+ return variables->get_variant(v);
+ }
+ }
+ return String();
}