From 4ff4809ede4f1d28a15a2149b5845d99af4437a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Wed, 2 Jan 2019 01:14:17 +0200 Subject: [PATCH] listbox: set selected_row before emitting signal Signal emittion was added in 6f857f87dcd9 commit and it seems that this is only place where selected_row is set after emitting signal. Because of this gtk_list_box_get_selected_row currently returns NULL as selected row if selection mode is set to GTK_SELECTION_BROWSE. --- gtk/gtklistbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 6fc931498a..a1213d2928 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -1727,8 +1727,8 @@ gtk_list_box_update_selection_full (GtkListBox *box, { gtk_list_box_unselect_all_internal (box); gtk_list_box_row_set_selected (row, TRUE); - g_signal_emit (box, signals[ROW_SELECTED], 0, row); priv->selected_row = row; + g_signal_emit (box, signals[ROW_SELECTED], 0, row); } else if (priv->selection_mode == GTK_SELECTION_SINGLE) {