diff --git a/Changelog b/Changelog index 2e6bdddca..d3e0e2b78 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,8 @@ - BUGFIX: Made IP filter parser more robust - BUGFIX: Fixed torrent creation tool - BUGFIX: Fixed possible overflow in progress calculation in arborescence.h + - BUGFIX: Save properties window size, position, columns width and restore them + - BUGFIX: Set a minimum default width for NAME column in properties * Sun Jul 12 2009 - Christophe DUMEZ - v1.3.4 - BUGFIX: Fixed IP filter file parsing on 64bits diff --git a/src/properties_imp.cpp b/src/properties_imp.cpp index 7466e56db..cbebc28fb 100644 --- a/src/properties_imp.cpp +++ b/src/properties_imp.cpp @@ -146,6 +146,7 @@ properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h } properties::~properties(){ + writeSettings(); qDebug("Properties destroyed"); delete updateInfosTimer; delete PropDelegate; @@ -187,6 +188,11 @@ void properties::writeSettings() { settings.beginGroup(QString::fromUtf8("PropWindow")); settings.setValue(QString::fromUtf8("size"), size()); settings.setValue(QString::fromUtf8("pos"), pos()); + QVariantList contentColsWidths; + for(int i=0; icolumnCount()-1; ++i) { + contentColsWidths.append(filesList->columnWidth(i)); + } + settings.setValue(QString::fromUtf8("contentColsWidths"), contentColsWidths); settings.endGroup(); } @@ -194,6 +200,14 @@ void properties::loadSettings() { QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); resize(settings.value(QString::fromUtf8("PropWindow/size"), size()).toSize()); move(settings.value(QString::fromUtf8("PropWindow/pos"), screenCenter()).toPoint()); + QVariantList contentColsWidths = settings.value(QString::fromUtf8("PropWindow/contentColsWidths"), QVariantList()).toList(); + if(contentColsWidths.empty()) { + filesList->header()->resizeSection(NAME, 200); + } else { + for(int i=0; isetColumnWidth(i, contentColsWidths.at(i).toInt()); + } + } } // Center window