[libhandy/benzea/fix-combo-row-checkmark: 1/2] combo-row: Only update selection after widget is synced
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/benzea/fix-combo-row-checkmark: 1/2] combo-row: Only update selection after widget is synced
- Date: Thu, 21 Jan 2021 16:48:38 +0000 (UTC)
commit 1264af580c072768a45059970bcdbe505a1aed98
Author: Benjamin Berg <bberg redhat com>
Date: Thu Jan 21 17:45:08 2021 +0100
combo-row: Only update selection after widget is synced
We need the signal for "items-changed" of the bound model to be
processed only after the underlying widget is changed. Do so by changing
it to use g_signal_connect_after.
This fixes an issue where the wrong item is marked as selected in the
model.
src/hdy-combo-row.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/hdy-combo-row.c b/src/hdy-combo-row.c
index c90cacea..de19ed1b 100644
--- a/src/hdy-combo-row.c
+++ b/src/hdy-combo-row.c
@@ -563,7 +563,7 @@ hdy_combo_row_bind_model (HdyComboRow *self,
priv->create_widget_func_data = user_data;
priv->create_widget_func_data_free_func = user_data_free_func;
- g_signal_connect (priv->bound_model, "items-changed", G_CALLBACK (bound_model_changed), self);
+ g_signal_connect_after (priv->bound_model, "items-changed", G_CALLBACK (bound_model_changed), self);
if (g_list_model_get_n_items (priv->bound_model) > 0)
priv->selected_index = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]