Fix and improve file priorities editing

This commit is contained in:
Christophe Dumez
2010-10-31 16:05:59 +00:00
parent 390508e7db
commit 658d876ff7
5 changed files with 69 additions and 48 deletions

View File

@@ -96,6 +96,9 @@ public:
QItemDelegate::drawBackground(painter, opt, index);
QString text = "";
switch(index.data().toInt()) {
case -1:
text = tr("Mixed", "Mixed (priorities");
break;
case 0:
text = tr("Not downloaded");
break;
@@ -151,8 +154,8 @@ public:
QTorrentHandle h = properties->getCurrentTorrent();
if(!h.is_valid() || static_cast<torrent_handle>(h).is_seed() || !h.has_metadata()) return 0;
}
if(index.data().toInt() == 0) {
// IGNORED
if(index.data().toInt() <= 0) {
// IGNORED or MIXED
return 0;
}
QComboBox* editor = new QComboBox(parent);