changeset 4397:d585f103e6ae

fix last playlist item not being highlighted when selected
author mf0102 <0102@gmx.at>
date Sun, 30 Mar 2008 15:57:03 +0200
parents b2f3e74230e7
children 8ac61d6e6cc1
files src/audacious/ui_skinned_playlist.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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,