Ensure that all tranferlist columns have a size > 0.

This commit is contained in:
sledgehammer999 2013-06-29 18:16:23 +03:00
commit b32a68318c
2 changed files with 8 additions and 0 deletions

View file

@ -126,6 +126,13 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window,
setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true);
}
//When adding/removing columns between versions some may
//end up being size 0 when the new version is launched with
//a conf file from the previous version.
for (unsigned int i=0; i<TorrentModelItem::NB_COLUMNS; i++)
if (!columnWidth(i))
resizeColumnToContents(i);
setContextMenuPolicy(Qt::CustomContextMenu);
// Listen for list events