gnucash maint: Bug 794584 - Register not updated when scheduled transactions created

John Ralls jralls at code.gnucash.org
Fri Aug 12 16:08:52 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/15592254 (commit)
	from  https://github.com/Gnucash/gnucash/commit/2d8bda80 (commit)



commit 155922540dc2eb051cf98c4362bc2fb672ce60a7
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Aug 12 13:05:17 2022 -0700

    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.

diff --git a/gnucash/gnome/dialog-sx-since-last-run.c b/gnucash/gnome/dialog-sx-since-last-run.c
index ee5103eb1..f15bb2175 100644
--- a/gnucash/gnome/dialog-sx-since-last-run.c
+++ b/gnucash/gnome/dialog-sx-since-last-run.c
@@ -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);
diff --git a/gnucash/gnome/gnc-plugin-basic-commands.c b/gnucash/gnome/gnc-plugin-basic-commands.c
index 1f4b83a65..41c1338d1 100644
--- a/gnucash/gnome/gnc-plugin-basic-commands.c
+++ b/gnucash/gnome/gnc-plugin-basic-commands.c
@@ -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);



Summary of changes:
 gnucash/gnome/dialog-sx-since-last-run.c  | 3 +++
 gnucash/gnome/gnc-plugin-basic-commands.c | 5 +++++
 2 files changed, 8 insertions(+)



More information about the gnucash-changes mailing list