Add missing mapToSource() in MainWindow::PlaylistRightClick
This commit is contained in:
parent
79ac16afeb
commit
b762987cd6
|
@ -1734,11 +1734,16 @@ void MainWindow::PlaylistRightClick(const QPoint& global_pos,
|
||||||
int not_in_queue = 0;
|
int not_in_queue = 0;
|
||||||
int in_skipped = 0;
|
int in_skipped = 0;
|
||||||
int not_in_skipped = 0;
|
int not_in_skipped = 0;
|
||||||
for (const QModelIndex& index : selection) {
|
for (const QModelIndex& idx : selection) {
|
||||||
if (index.column() != 0) continue;
|
if (idx.column() != 0) continue;
|
||||||
|
|
||||||
|
const QModelIndex src_idx =
|
||||||
|
app_->playlist_manager()->current()->proxy()->mapToSource(idx);
|
||||||
|
if (!src_idx.isValid()) continue;
|
||||||
|
|
||||||
PlaylistItemPtr item =
|
PlaylistItemPtr item =
|
||||||
app_->playlist_manager()->current()->item_at(index.row());
|
app_->playlist_manager()->current()->item_at(src_idx.row());
|
||||||
|
|
||||||
if (item->Metadata().has_cue()) {
|
if (item->Metadata().has_cue()) {
|
||||||
cue_selected = true;
|
cue_selected = true;
|
||||||
} else if (item->Metadata().IsEditable()) {
|
} else if (item->Metadata().IsEditable()) {
|
||||||
|
@ -1749,7 +1754,7 @@ void MainWindow::PlaylistRightClick(const QPoint& global_pos,
|
||||||
streams++;
|
streams++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index.data(Playlist::Role_QueuePosition).toInt() == -1)
|
if (src_idx.data(Playlist::Role_QueuePosition).toInt() == -1)
|
||||||
not_in_queue++;
|
not_in_queue++;
|
||||||
else
|
else
|
||||||
in_queue++;
|
in_queue++;
|
||||||
|
|
Loading…
Reference in New Issue