You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
ScriptEditor::reload_scripts only call deferred if not main thread
This commit is contained in:
@@ -2821,7 +2821,11 @@ void ScriptEditor::apply_scripts() const {
|
|||||||
|
|
||||||
void ScriptEditor::reload_scripts(bool p_refresh_only) {
|
void ScriptEditor::reload_scripts(bool p_refresh_only) {
|
||||||
// Call deferred to make sure it runs on the main thread.
|
// Call deferred to make sure it runs on the main thread.
|
||||||
|
if (!Thread::is_main_thread()) {
|
||||||
callable_mp(this, &ScriptEditor::_reload_scripts).call_deferred(p_refresh_only);
|
callable_mp(this, &ScriptEditor::_reload_scripts).call_deferred(p_refresh_only);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_reload_scripts(p_refresh_only);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEditor::_reload_scripts(bool p_refresh_only) {
|
void ScriptEditor::_reload_scripts(bool p_refresh_only) {
|
||||||
|
|||||||
Reference in New Issue
Block a user