Skip to content

Commit

Permalink
Merge pull request #82847 from KoBeWi/discard_changes_when_discarding…
Browse files Browse the repository at this point in the history
…_changes

Fix unsaved changes not getting discarded
  • Loading branch information
akien-mga committed Oct 5, 2023
2 parents cd7c50f + 5d85551 commit 6e57580
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6e57580

Please sign in to comment.