From 0f76265c29dafb70bdf8bc1d203eefa508f43731 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Mon, 7 Dec 2020 13:57:47 +0000 Subject: [PATCH] Move flag to indicate report loaded to before gnc_html_show_url If the report fails to load and gives an error message, once the error message is closed the focus goes back to the report page and starts to load the report again so to fix this the loaded flag is moved to before gnc_html_show_url --- gnucash/gnome/gnc-plugin-page-report.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnucash/gnome/gnc-plugin-page-report.c b/gnucash/gnome/gnc-plugin-page-report.c index 8cebd4f733..1cf9958742 100644 --- a/gnucash/gnome/gnc-plugin-page-report.c +++ b/gnucash/gnome/gnc-plugin-page-report.c @@ -377,6 +377,8 @@ gnc_plugin_page_report_load_uri (GncPluginPage *page) gtk_widget_show_all( GTK_WIDGET(priv->container) ); + priv->loaded = TRUE; + // this sets the window for the progressbar gnc_window_set_progressbar_window( GNC_WINDOW(page->window) ); @@ -386,8 +388,6 @@ gnc_plugin_page_report_load_uri (GncPluginPage *page) gnc_html_show_url(priv->html, type, url_location, url_label, 0); g_free(url_location); - priv->loaded = TRUE; - gnc_plugin_page_report_set_progressbar( page, FALSE ); // this resets the window for the progressbar to NULL