gnucash maint: Enable the opening balance tab in the Edit Account dialog.

John Ralls jralls at code.gnucash.org
Sun May 23 18:02:29 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/0a5f05c0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/f782ef37 (commit)



commit 0a5f05c0cb509228fcb41db18ccb4d0e052ddf44
Author: Ralf Habacker <ralf.habacker at freenet.de>
Date:   Sat May 22 14:57:46 2021 +0200

    Enable the opening balance tab in the Edit Account dialog.
    
    When the account has no splits. This enables a user who meant to add an
    opening account either in the Account Hierarchy Assistant or the New
    Account dialog to do so more easily than by creating such a transaction
    by hand.

diff --git a/gnucash/gnome-utils/dialog-account.c b/gnucash/gnome-utils/dialog-account.c
index d90bc06df..05ffc0398 100644
--- a/gnucash/gnome-utils/dialog-account.c
+++ b/gnucash/gnome-utils/dialog-account.c
@@ -1977,7 +1977,8 @@ gnc_ui_edit_account_window(GtkWindow *parent, Account *account)
     gnc_resume_gui_refresh ();
 
     gtk_widget_show_all (aw->dialog);
-    gtk_widget_hide (aw->opening_balance_page);
+    if (xaccAccountGetSplitList (account) != NULL)
+        gtk_widget_hide (aw->opening_balance_page);
 
     parent_acct = gnc_account_get_parent (account);
     if (parent_acct == NULL)



Summary of changes:
 gnucash/gnome-utils/dialog-account.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list