mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
Merge pull request #28695 from Ranoller/patch-2
FIX Script editor doesn´t send unsaved script #28693
This commit is contained in:
commit
44bddecb89
1 changed files with 8 additions and 0 deletions
|
|
@ -388,6 +388,14 @@ void ScriptEditor::_save_history() {
|
|||
|
||||
void ScriptEditor::_go_to_tab(int p_idx) {
|
||||
|
||||
ScriptEditorBase *current = _get_current_editor();
|
||||
if (current) {
|
||||
if (current->is_unsaved()) {
|
||||
|
||||
current->apply_code();
|
||||
}
|
||||
}
|
||||
|
||||
Control *c = Object::cast_to<Control>(tab_container->get_child(p_idx));
|
||||
if (!c)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue