only play expanded songs, music_random (#376)
This commit is contained in:
parent
1da6e37e04
commit
7bac3c9514
@ -4295,11 +4295,14 @@ void Courtroom::music_random()
|
|||||||
QTreeWidgetItemIterator::NotHidden |
|
QTreeWidgetItemIterator::NotHidden |
|
||||||
QTreeWidgetItemIterator::NoChildren);
|
QTreeWidgetItemIterator::NoChildren);
|
||||||
while (*it) {
|
while (*it) {
|
||||||
clist += (*it);
|
if ((*it)->parent()->isExpanded()) {
|
||||||
|
clist += (*it);
|
||||||
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
int i = qrand() % clist.length();
|
if (clist.length() == 0)
|
||||||
on_music_list_double_clicked(clist.at(i), 1);
|
return;
|
||||||
|
on_music_list_double_clicked(clist.at(qrand() % clist.length()), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Courtroom::music_list_expand_all() { ui_music_list->expandAll(); }
|
void Courtroom::music_list_expand_all() { ui_music_list->expandAll(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user