Bug 794584 - Register not updated when scheduled transactions created

Force the registers to refresh if there are automaticly created
transactions. That will mean two refreshes if the SLR dialog needs to
display and the user clicks OK, but the alternative is somehow tracking
whether to refresh if the user cancels the dialog. This is simpler and
an extra refresh call is harmless.
This commit is contained in:
John Ralls 2022-08-12 13:05:17 -07:00
parent 2d8bda80c3
commit 155922540d
2 changed files with 8 additions and 0 deletions

View File

@ -848,6 +848,9 @@ gnc_sx_sxsincelast_book_opened (void)
gnc_sx_instance_model_effect_change (inst_model, TRUE, &auto_created_txns,
&creation_errors);
if (auto_created_txns)
gnc_gui_refresh_all();
if (summary.need_dialog)
{
gnc_ui_sx_since_last_run_dialog (gnc_ui_get_main_window (NULL), inst_model, auto_created_txns);

View File

@ -38,6 +38,7 @@
#include "gnc-plugin-basic-commands.h"
#include "gnc-ui-util.h"
#include "gnc-component-manager.h"
#include "dialog-doclink.h"
#include "dialog-book-close.h"
@ -557,6 +558,10 @@ gnc_main_window_cmd_actions_since_last_run (GtkAction *action, GncMainWindowActi
sx_instances = gnc_sx_get_current_instances();
gnc_sx_instance_model_summarize(sx_instances, &summary);
gnc_sx_instance_model_effect_change(sx_instances, TRUE, &auto_created_txns, NULL);
if (auto_created_txns)
gnc_gui_refresh_all();
if (summary.need_dialog)
{
gnc_ui_sx_since_last_run_dialog (window, sx_instances, auto_created_txns);