summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-05-12 16:07:05 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-05-12 16:10:48 +0300
commita439832035a0a07426b4557b4286b2e2e4992054 (patch)
treea0d5e2b74f00d7a98d437e20b353cd289faf27db /editor
parenta624bfe150b6f438075993cdc96ea2703f08bfc7 (diff)
Fix signal completion in GDScript editor
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_text_editor.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 981881fb9b..bed7739239 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -855,6 +855,21 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
emit_signal(SNAME("go_to_help"), "class_method:" + result.class_name + ":" + result.class_member);
} break;
+ case ScriptLanguage::LOOKUP_RESULT_CLASS_SIGNAL: {
+ StringName cname = result.class_name;
+
+ while (true) {
+ if (ClassDB::has_signal(cname, result.class_member)) {
+ result.class_name = cname;
+ cname = ClassDB::get_parent_class(cname);
+ } else {
+ break;
+ }
+ }
+
+ emit_signal(SNAME("go_to_help"), "class_signal:" + result.class_name + ":" + result.class_member);
+
+ } break;
case ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM: {
StringName cname = result.class_name;
StringName success;