changeset 4422:3bf0124ffd2b

fix my previous commit
author Tomasz Mon <desowin@gmail.com>
date Tue, 01 Apr 2008 22:23:35 +0200
parents ae628568ea94
children 5717879de1af 714cb0cc602a
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	Mon Mar 31 20:47:07 2008 +0200
+++ b/src/audacious/ui_skinned_playlist.c	Tue Apr 01 22:23:35 2008 +0200
@@ -508,7 +508,7 @@
     list = g_list_nth(list, pl->first);
 
     for (i = pl->first;
-         list && i <= pl->first + pl->num_visible;
+         list && i < pl->first + pl->num_visible;
          list = g_list_next(list), i++) {
         entry = list->data;
 
@@ -527,10 +527,12 @@
             in_selection = TRUE;
         }
 
-        if ((!entry->selected || !g_list_next(list)) && in_selection) {
+        if ((!entry->selected || i == pl->first + pl->num_visible - 1)
+            && in_selection) {
+
             if (!entry->selected)
                 yc = (((i - 1) - pl->first) * pl->fheight);
-            else /* !g_list_next(list) */
+            else /* last visible item */
                 yc = ((i - pl->first) * pl->fheight);
 
             cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2));