Skip to content

Commit deded46

Browse files
[gnc-plugin-page-report] confirm before overwriting saved report
1 parent c15ddb0 commit deded46

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gnucash/gnome/gnc-plugin-page-report.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,13 @@ gnc_plugin_page_report_save_cb (GSimpleAction *simple,
17221722
check_func = scm_c_eval_string("gnc:is-custom-report-type");
17231723
if (scm_is_true (scm_call_1 (check_func, priv->cur_report)))
17241724
{
1725+
auto report_name_str{priv->cur_odb->lookup_string_option("General", "Report name")};
1726+
auto window{GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(report)))};
1727+
1728+
if (!gnc_action_dialog (window, _("_Overwrite"), false, _("This will update and \
1729+
overwrite the existing saved report named \"%s\"."), report_name_str.c_str()))
1730+
return;
1731+
17251732
/* The current report is already based on a custom report.
17261733
* Replace the existing one instead of adding a new one
17271734
*/

0 commit comments

Comments
 (0)