mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 799020 - widget of gnc-register-list-option disregards user's clicks
If the GtkTreeSelection's mode isn't set to GTK_SELECTION_MULTIPLE then each call to gtk_tree_selection_select_path overrides the previous one and only one item is selected.
This commit is contained in:
parent
2e76d2f43d
commit
84eb084375
@ -1152,10 +1152,12 @@ class GncGtkListUIItem : public GncOptionGtkUIItem
|
||||
public:
|
||||
GncGtkListUIItem(GtkWidget* widget) :
|
||||
GncOptionGtkUIItem{widget, GncOptionUIType::LIST} {}
|
||||
|
||||
void set_ui_item_from_option(GncOption& option) noexcept override
|
||||
{
|
||||
auto widget{GTK_TREE_VIEW(get_widget())};
|
||||
auto selection{gtk_tree_view_get_selection(widget)};
|
||||
gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
|
||||
g_signal_handlers_block_by_func(selection, (gpointer)list_changed_cb, &option);
|
||||
gtk_tree_selection_unselect_all(selection);
|
||||
for (auto index : option.get_value<GncMultichoiceOptionIndexVec>())
|
||||
|
Loading…
Reference in New Issue
Block a user