projects
/
someplayer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad42d87
)
TECH, reverted previous handling "Add to favorites" button
author
Nikolay Tischenko
<niktischenko@gmail.com>
Sun, 28 Nov 2010 09:47:39 +0000
(15:47 +0600)
committer
Nikolay Tischenko
<niktischenko@gmail.com>
Sun, 28 Nov 2010 09:47:39 +0000
(15:47 +0600)
src/playerform.cpp
patch
|
blob
|
history
diff --git
a/src/playerform.cpp
b/src/playerform.cpp
index
d6ab72a
..
09d6a44
100644
(file)
--- a/
src/playerform.cpp
+++ b/
src/playerform.cpp
@@
-286,7
+286,11
@@
void PlayerForm::_enqueue_track() {
}
void PlayerForm::_add_to_favorites() {
- Track cur = _player->current();
+ QList<QModelIndex> idx = ui->playlistView->selectionModel()->selectedIndexes();
+ if (idx.isEmpty())
+ return;
+ int id = idx.first().row();
+ Track cur = _current_playlist.tracks().at(id);
if (!cur.source().isEmpty()) {
bool isf = _lib->isFavorite(cur);
if (!isf) {