From 651558d6c4ddcf99b526af1263478af2fda804ee Mon Sep 17 00:00:00 2001 From: Tobias Rundstrom Date: Sat, 4 Mar 2006 21:41:56 -0300 Subject: [PATCH] Fixed annoying of-by-one bug in the selection --- PlaylistList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PlaylistList.cpp b/PlaylistList.cpp index 905447f..9572a80 100644 --- a/PlaylistList.cpp +++ b/PlaylistList.cpp @@ -257,11 +257,11 @@ PlaylistList::mousePressEvent (QMouseEvent *event) if (m_selected->count () > 0) { int o = m_selected->last (); if (o < i) { - for (int y = o; y <= i; y++) { + for (int y = o+1; y <= i; y++) { m_selected->append (y); } } else { - for (int y = i; y <= o; y++) { + for (int y = i; y < o; y++) { m_selected->append (y); } } @@ -444,7 +444,7 @@ PlaylistList::keyPressEvent (QKeyEvent *event) { /* Sort list and remove in reverse order */ qSort (*m_selected); - for (int i = m_selected->count () - 1; i >= 0; i --) { + for (int i = (m_selected->count () - 1); i >= 0; i --) { xmmsh->playlistRemove (m_selected->value (i)); } m_selected->clear ();