Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 756e3b4..6259b3f 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -136,25 +136,24 @@ void PlayListSelection::moveSelectedDown() { | |||
136 | 136 | ||
137 | 137 | ||
138 | bool PlayListSelection::prev() { | 138 | bool PlayListSelection::prev() { |
139 | QListViewItem *item = selectedItem(); | 139 | QListViewItem *item = selectedItem(); |
140 | if ( item && item->itemAbove() ) | 140 | if ( item && item->itemAbove() ) |
141 | setSelected( item->itemAbove(), TRUE ); | 141 | setSelected( item->itemAbove(), TRUE ); |
142 | else | 142 | else |
143 | return FALSE; | 143 | return FALSE; |
144 | ensureItemVisible( selectedItem() ); | 144 | ensureItemVisible( selectedItem() ); |
145 | return TRUE; | 145 | return TRUE; |
146 | } | 146 | } |
147 | 147 | ||
148 | |||
149 | bool PlayListSelection::next() { | 148 | bool PlayListSelection::next() { |
150 | QListViewItem *item = selectedItem(); | 149 | QListViewItem *item = selectedItem(); |
151 | if ( item && item->itemBelow() ) | 150 | if ( item && item->itemBelow() ) |
152 | setSelected( item->itemBelow(), TRUE ); | 151 | setSelected( item->itemBelow(), TRUE ); |
153 | else | 152 | else |
154 | return FALSE; | 153 | return FALSE; |
155 | ensureItemVisible( selectedItem() ); | 154 | ensureItemVisible( selectedItem() ); |
156 | return TRUE; | 155 | return TRUE; |
157 | } | 156 | } |
158 | 157 | ||
159 | 158 | ||
160 | bool PlayListSelection::first() { | 159 | bool PlayListSelection::first() { |
@@ -172,12 +171,17 @@ bool PlayListSelection::last() { | |||
172 | QListViewItem *prevItem = NULL; | 171 | QListViewItem *prevItem = NULL; |
173 | QListViewItem *item = firstChild(); | 172 | QListViewItem *item = firstChild(); |
174 | while ( ( item = item->nextSibling() ) ) | 173 | while ( ( item = item->nextSibling() ) ) |
175 | prevItem = item; | 174 | prevItem = item; |
176 | if ( prevItem ) | 175 | if ( prevItem ) |
177 | setSelected( prevItem, TRUE ); | 176 | setSelected( prevItem, TRUE ); |
178 | else | 177 | else |
179 | return FALSE; | 178 | return FALSE; |
180 | ensureItemVisible( selectedItem() ); | 179 | ensureItemVisible( selectedItem() ); |
181 | return TRUE; | 180 | return TRUE; |
182 | } | 181 | } |
183 | 182 | ||
183 | void PlayListSelection::unSelect() | ||
184 | { | ||
185 | QListViewItem *item = selectedItem(); | ||
186 | setSelected( currentItem(), FALSE); | ||
187 | } \ No newline at end of file | ||