- Prevent users from filtering all the files in a torrent using right-click menu (combobox was ok)

This commit is contained in:
Christophe Dumez
2007-07-31 15:37:14 +00:00
parent 58dc75fbcf
commit 57b4a7150a
5 changed files with 59 additions and 7 deletions

View File

@@ -165,7 +165,7 @@ class PropListDelegate: public QItemDelegate {
bool onlyOneItem(const QModelIndex& index) const {
const QAbstractItemModel *model = index.model();
unsigned int nbRows = model->rowCount();
if(nbRows == (unsigned int)1) return true;
if(nbRows == 1) return true;
for(unsigned int i=0; i<nbRows; ++i){
if((unsigned int)index.row() == i) continue;
if(model->data(model->index(i, PRIORITY)).toInt()) return false;