- Fix several bugs in new "Append label to save path" feature

This commit is contained in:
Christophe Dumez 2009-12-18 16:56:57 +00:00
parent dc0ad73eca
commit 411a1c641d
4 changed files with 19 additions and 2 deletions

View file

@ -98,6 +98,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, GUI* main_window, TransferLi
connect(transferList, SIGNAL(currentTorrentChanged(QTorrentHandle&)), this, SLOT(loadTorrentInfos(QTorrentHandle &)));
connect(PropDelegate, SIGNAL(filteredFilesChanged()), this, SLOT(filteredFilesChanged()));
connect(stackedProperties, SIGNAL(currentChanged(int)), this, SLOT(loadDynamicData()));
connect(BTSession, SIGNAL(savePathChanged(QTorrentHandle&)), this, SLOT(updateSavePath(QTorrentHandle&)));
// Downloaded pieces progress bar
downloaded_pieces = new DownloadedPiecesBar(this);
@ -211,6 +212,12 @@ Bittorrent* PropertiesWidget::getBTSession() const {
return BTSession;
}
void PropertiesWidget::updateSavePath(QTorrentHandle& _h) {
if(h.is_valid() && h == _h) {
save_path->setText(TorrentPersistentData::getSavePath(h.hash()));
}
}
void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
clear();
h = _h;