gnucash stable: Bug 799010 - gnc-register-account-sel-limited-option errors doesn't work
John Ralls
jralls at code.gnucash.org
Thu Jul 20 19:46:17 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/e5f9e4ea (commit)
from https://github.com/Gnucash/gnucash/commit/9891a68f (commit)
commit e5f9e4ea6d04fb08ce275e5f7b789cdd02266a4c
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jul 20 16:44:05 2023 -0700
Bug 799010 - gnc-register-account-sel-limited-option errors doesn't work
Wrong cast in GncGtkAccountSelUIItem::set_option_from_ui_item.
diff --git a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
index 747d646051..e9f96f99c2 100644
--- a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
+++ b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
@@ -1082,7 +1082,8 @@ public:
void set_option_from_ui_item(GncOption& option) noexcept override
{
auto widget{GNC_ACCOUNT_SEL(get_widget())};
- option.set_value(qof_instance_cast((gnc_account_sel_get_account(widget))));
+// Must cast it to const Account* to get the template specialization to recognize it.
+ option.set_value(static_cast<const Account*>(gnc_account_sel_get_account(widget)));
}
};
Summary of changes:
gnucash/gnome-utils/gnc-option-gtk-ui.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list