mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix boolean controls so that the set visitor recognizes the value.
This commit is contained in:
parent
2dd8d782e5
commit
e3b5a7d833
@ -926,7 +926,7 @@ public:
|
||||
void set_option_from_ui_item(GncOption& option) noexcept override
|
||||
{
|
||||
auto widget{GTK_TOGGLE_BUTTON(get_widget())};
|
||||
option.set_value(gtk_toggle_button_get_active(widget));
|
||||
option.set_value(static_cast<bool>(gtk_toggle_button_get_active(widget)));
|
||||
}
|
||||
};
|
||||
|
||||
@ -944,7 +944,7 @@ create_option_widget<GncOptionUIType::BOOLEAN> (GncOption& option,
|
||||
gtk_box_set_homogeneous (GTK_BOX (*enclosing), FALSE);
|
||||
auto widget = gtk_check_button_new ();
|
||||
|
||||
auto ui_item{std::make_unique<GncGtkBooleanUIItem>(GncGtkBooleanUIItem{widget})};
|
||||
auto ui_item{std::make_unique<GncGtkBooleanUIItem>(widget)};
|
||||
|
||||
g_signal_connect(G_OBJECT(widget), "toggled",
|
||||
G_CALLBACK(gnc_option_changed_widget_cb), &option);
|
||||
|
Loading…
Reference in New Issue
Block a user