summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herzog <thomas.herzog@mail.com>2017-07-30 15:55:35 +0200
committerGitHub <noreply@github.com>2017-07-30 15:55:35 +0200
commitf1fe2cd90e07fbfa8883b3129f27186a33608a4b (patch)
treedcf5c50d1a36c4e0f627d4b1be47a9d1f09f0f57
parent597e5ebedf6ccb6a19309f3f648f668b57052660 (diff)
parentfc9f5d59b5bfd2a4cee5c65837b2b280ae8fa7e9 (diff)
Merge pull request #9980 from karroffel/nativescript-baseclass-signal-fix
[NativeScript] fix signals from base class not being accessible
-rw-r--r--modules/nativescript/nativescript.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp
index c4cbfcce51..e7445e6da9 100644
--- a/modules/nativescript/nativescript.cpp
+++ b/modules/nativescript/nativescript.cpp
@@ -288,9 +288,13 @@ ScriptLanguage *NativeScript::get_language() const {
bool NativeScript::has_script_signal(const StringName &p_signal) const {
NativeScriptDesc *script_data = get_script_desc();
- if (!script_data)
- return false;
- return script_data->signals_.has(p_signal);
+
+ while (script_data) {
+ if (script_data->signals_.has(p_signal))
+ return true;
+ script_data = script_data->base_data;
+ }
+ return false;
}
void NativeScript::get_script_signal_list(List<MethodInfo> *r_signals) const {