Merge pull request #82847 from KoBeWi/discard_changes_when_discarding_changes

Fix unsaved changes not getting discarded
This commit is contained in:
Rémi Verschelde 2023-10-05 16:33:28 +02:00
commit 6e5758013b
No known key found for this signature in database
GPG Key ID: C3336907360768E1

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