Fix unsaved changes not getting discarded

This commit is contained in:
kobewi 2023-10-05 14:03:02 +02:00
parent c2b916751d
commit 5d85551ab3

View File

@ -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();
}