# HG changeset patch # User mf0102 <0102@gmx.at> # Date 1206885423 -7200 # Node ID d585f103e6aee56fc42b086e31e62360a3d7422f # Parent b2f3e74230e7d7550d0835bf7d501796988029d9 fix last playlist item not being highlighted when selected diff -r b2f3e74230e7 -r d585f103e6ae src/audacious/ui_skinned_playlist.c --- a/src/audacious/ui_skinned_playlist.c Sun Mar 30 13:31:14 2008 +0200 +++ b/src/audacious/ui_skinned_playlist.c Sun Mar 30 15:57:03 2008 +0200 @@ -512,7 +512,6 @@ list = g_list_next(list), i++) { entry = list->data; - if (entry->selected && !in_selection) { yc = ((i - pl->first) * pl->fheight); @@ -528,8 +527,11 @@ in_selection = TRUE; } - if (!entry->selected && in_selection) { - yc = (((i - 1) - pl->first) * pl->fheight); + if ((!entry->selected || !g_list_next(list)) && in_selection) { + if (!entry->selected) + yc = (((i - 1) - pl->first) * pl->fheight); + else /* !g_list_next(list) */ + yc = ((i - pl->first) * pl->fheight); cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2)); cairo_curve_to (cr, 0 + width, yc + pl->fheight - rounding_offset,