diff --git qt/torrent-model.cc qt/torrent-model.cc
index 5f5b9af..2ba9d24 100644
|
|
TorrentModel :: removeTorrent( int id ) |
206 | 206 | Torrent * tor = myIdToTorrent.value( id, 0 ); |
207 | 207 | |
208 | 208 | beginRemoveRows( QModelIndex(), row, row ); |
| 209 | /* We need to make the myIdToRow map consistent with what exists in the list view/model */ |
| 210 | for( QMap<int,int>::iterator i = myIdToRow.begin(); i != myIdToRow.end(); ++i ) |
| 211 | if( i.value() > row ) --i.value(); |
209 | 212 | myIdToRow.remove( id ); |
210 | 213 | myIdToTorrent.remove( id ); |
211 | 214 | myTorrents.remove( myTorrents.indexOf( tor ) ); |