mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Correctly handle uncommitted edits when opening a file from history.
By calling gnc_main_window_finish_pending as is done in all other execution paths that close the session. That allows an open edit to be committed or cancelled before the user is prompted to save the file instead of after when it's too late. It also allows the user to cancel closing the session at that point if there's more work to be done on the transaction.
This commit is contained in:
parent
c08b13d27d
commit
07e449a677
@ -684,6 +684,8 @@ gnc_plugin_file_history_cmd_open_file (GSimpleAction *simple,
|
||||
g_return_if_fail (G_IS_SIMPLE_ACTION(simple));
|
||||
g_return_if_fail (data != NULL);
|
||||
|
||||
if (!gnc_main_window_finish_pending(data->window))
|
||||
return;
|
||||
// action name will be of the form 'RecentFile1Action'
|
||||
action_name = g_action_get_name (G_ACTION(simple));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user