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

@@ -474,6 +474,7 @@ void QTorrentHandle::add_url_seed(QString seed) {
void QTorrentHandle::prioritize_files(const std::vector<int> &v) {
// Does not do anything for seeding torrents
Q_ASSERT(torrent_handle::is_valid());
Q_ASSERT(v.size() == (unsigned int)torrent_handle::get_torrent_info().num_files());
if(v.size() != (unsigned int)torrent_handle::get_torrent_info().num_files())
return;
bool was_seed = is_seed();