From b450d9a63710a5d09f1f18d9109ec034c6a7b40d Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Wed, 8 Nov 2023 05:53:50 +0800 Subject: [PATCH] [gnc-plugin-page-report] re-enable actions after disabling Otherwise Print, PDFExport, Report Options remain disabled after modifying report options. Also restore nullptr sentinel in disable_during_load_actions array. --- gnucash/gnome/gnc-plugin-page-report.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnucash/gnome/gnc-plugin-page-report.cpp b/gnucash/gnome/gnc-plugin-page-report.cpp index a8a58ce7e08..a700a233c2f 100644 --- a/gnucash/gnome/gnc-plugin-page-report.cpp +++ b/gnucash/gnome/gnc-plugin-page-report.cpp @@ -210,7 +210,8 @@ static const gchar *disable_during_load_actions[] = { "FilePrintAction", "FilePrintPDFAction", - "ReportOptionsAction" + "ReportOptionsAction", + nullptr }; /** The default menu items that need to be add to the menu */ @@ -827,7 +828,7 @@ gnc_plugin_page_report_option_change_cb(gpointer data) gnc_window_set_progressbar_window( nullptr ); gnc_plugin_set_actions_enabled(G_ACTION_MAP(priv->action_group), - disable_during_load_actions, FALSE); + disable_during_load_actions, TRUE); priv->reloading = FALSE; } @@ -1489,7 +1490,7 @@ gnc_plugin_page_report_reload_cb (GSimpleAction *simple, // this resets the window for the progressbar to nullptr gnc_window_set_progressbar_window( nullptr ); gnc_plugin_set_actions_enabled(G_ACTION_MAP(priv->action_group), - disable_during_load_actions, FALSE); + disable_during_load_actions, TRUE); priv->reloading = FALSE; }