mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 15:50:45 +00:00
Merge pull request #96007 from kitbdev/fix-external-script-reloading
Fix script overwriting with external editor
This commit is contained in:
commit
61f2a33353
@ -2711,9 +2711,11 @@ void ScriptEditor::apply_scripts() const {
|
||||
}
|
||||
|
||||
void ScriptEditor::reload_scripts(bool p_refresh_only) {
|
||||
if (external_editor_active) {
|
||||
return;
|
||||
}
|
||||
// Call deferred to make sure it runs on the main thread.
|
||||
callable_mp(this, &ScriptEditor::_reload_scripts).call_deferred(p_refresh_only);
|
||||
}
|
||||
|
||||
void ScriptEditor::_reload_scripts(bool p_refresh_only) {
|
||||
for (int i = 0; i < tab_container->get_tab_count(); i++) {
|
||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
|
||||
if (!se) {
|
||||
|
@ -436,6 +436,7 @@ class ScriptEditor : public PanelContainer {
|
||||
void _file_removed(const String &p_file);
|
||||
void _autosave_scripts();
|
||||
void _update_autosave_timer();
|
||||
void _reload_scripts(bool p_refresh_only = false);
|
||||
|
||||
void _update_members_overview_visibility();
|
||||
void _update_members_overview();
|
||||
|
Loading…
Reference in New Issue
Block a user