From 15427619bd33d9e0c83a26bfbe30f52f69a47657 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 9 Nov 2009 11:49:18 +0000 Subject: [PATCH] - Forgot to clear some properties data when no torrent is selected --- src/propertiesWidget.ui | 21 +++++++++++++++++++++ src/propertieswidget.cpp | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/src/propertiesWidget.ui b/src/propertiesWidget.ui index 1aaffde69..3f478397d 100644 --- a/src/propertiesWidget.ui +++ b/src/propertiesWidget.ui @@ -806,6 +806,27 @@ QAbstractItemView::ExtendedSelection + + false + + + true + + + false + + + true + + + false + + + true + + + true + diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index 82d667ed2..2261b848b 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -160,6 +160,8 @@ void PropertiesWidget::clear() { upTotal->clear(); dlTotal->clear(); shareRatio->clear(); + listWebSeeds->clear(); + PropListModel->clear(); setEnabled(false); } @@ -205,7 +207,10 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) { std::vector files_priority = loadFilesPriorities(); // List files in torrent arborescence *arb = new arborescence(h.get_torrent_info(), fp, files_priority); + PropListModel->clear(); addFilesToTree(arb->getRoot(), PropListModel->invisibleRootItem()); + // Increase first column width + //filesList->resizeColumnToContents(0); // does not work } catch(invalid_handle e) { }