In the account dialog, make sure that the state of the dialog is checked and not the account type

Fix for #762 mentioned at #820.
This commit is contained in:
Ralf Habacker
2021-05-22 12:55:19 +02:00
parent e0c260fe0b
commit f88033850c

View File

@@ -213,7 +213,7 @@ gnc_account_opening_balance_button_update (AccountWindow *aw, gnc_commodity *com
Account *ob_account = gnc_account_lookup_by_opening_balance (gnc_book_get_root_account (aw->book), commodity);
gboolean has_splits = (xaccAccountGetSplitList (account) != NULL);
if (xaccAccountGetType (account) != ACCT_TYPE_EQUITY)
if (aw->type != ACCT_TYPE_EQUITY)
{
gtk_widget_set_sensitive (aw->opening_balance_button, FALSE);
return;