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 <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2017-04-26 14:23:15 -04:00
parent a7565340d2
commit 638caeaa91
1 changed files with 1 additions and 1 deletions

View File

@ -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,