mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #82847 from KoBeWi/discard_changes_when_discarding_changes
Fix unsaved changes not getting discarded
This commit is contained in:
commit
6e5758013b
@ -863,6 +863,10 @@ void ScriptEditor::_close_current_tab(bool p_save) {
|
||||
}
|
||||
|
||||
void ScriptEditor::_close_discard_current_tab(const String &p_str) {
|
||||
Ref<Script> scr = _get_current_script();
|
||||
if (scr.is_valid()) {
|
||||
scr->reload_from_file();
|
||||
}
|
||||
_close_tab(tab_container->get_current_tab(), false);
|
||||
erase_tab_confirm->hide();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user