diff options
author | Chris Cranford <chris@hibernate.org> | 2024-04-16 20:01:53 -0400 |
---|---|---|
committer | Chris Cranford <chris@hibernate.org> | 2024-04-16 20:01:53 -0400 |
commit | d0fa2c3cfa6c06aceadee3601faf18932c89d411 (patch) | |
tree | acae858a3279941405e908df3ffa0c2d04281f81 | |
parent | f47f4a02c87bb701452a621d254ad30c7be84faa (diff) | |
download | redot-engine-d0fa2c3cfa6c06aceadee3601faf18932c89d411.tar.gz |
Defer call to set_break_language
-rw-r--r-- | core/object/script_language.cpp | 8 | ||||
-rw-r--r-- | core/object/script_language.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index 73da0ba2af..42e9c421ae 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -51,7 +51,7 @@ void Script::_notification(int p_what) { switch (p_what) { case NOTIFICATION_POSTINITIALIZE: { if (EngineDebugger::is_active()) { - EngineDebugger::get_script_debugger()->set_break_language(get_language()); + callable_mp(this, &Script::_set_debugger_break_language).call_deferred(); } } break; } @@ -103,6 +103,12 @@ Dictionary Script::_get_script_constant_map() { return ret; } +void Script::_set_debugger_break_language() { + if (EngineDebugger::is_active()) { + EngineDebugger::get_script_debugger()->set_break_language(get_language()); + } +} + int Script::get_script_method_argument_count(const StringName &p_method, bool *r_is_valid) const { MethodInfo mi = get_method_info(p_method); diff --git a/core/object/script_language.h b/core/object/script_language.h index c6c6f3de9f..223f114150 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -124,6 +124,8 @@ protected: TypedArray<Dictionary> _get_script_signal_list(); Dictionary _get_script_constant_map(); + void _set_debugger_break_language(); + public: virtual void reload_from_file() override; |