From 638caeaa916e7ab6e615c87bf32826714546cb5d Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 26 Apr 2017 14:23:15 -0400 Subject: [PATCH] gui/sidebar: Set the playlist before changing the random button Otherwise we could end up changing the random setting on the previous playlist when displaying a new one. Fixes #106: Switching playlists clears random setting Signed-off-by: Anna Schumaker --- gui/sidebar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/sidebar.c b/gui/sidebar.c index 2b116380..5e617a7e 100644 --- a/gui/sidebar.c +++ b/gui/sidebar.c @@ -144,9 +144,9 @@ void __gui_sidebar_selection_changed(GtkTreeSelection *selection, gpointer data) g_free(name); } + gui_treeview_set_playlist(playlist); gtk_toggle_button_set_active(gui_random_button(), active); gtk_widget_set_sensitive(GTK_WIDGET(gui_random_button()), sensitive); - gui_treeview_set_playlist(playlist); } bool __gui_sidebar_keypress(GtkTreeView *treeview, GdkEventKey *event,