From 58c0ac76382b970128c2be7a69782da9e75cef0a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 26 Sep 2010 17:10:21 +0000 Subject: [PATCH] BUGFIX: Really fix manual editing of save path in torrent addition dialog --- Changelog | 1 + src/torrentadditiondlg.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 4f47d307a..4fb35acda 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ * Sun Sep 26 2010 - Christophe Dumez - v2.4.2 - BUGFIX: Fix display of torrent content in addition dialog + - BUGFIX: Really fix manual editing of save path in torrent addition dialog * Sun Sep 26 2010 - Christophe Dumez - v2.4.1 - I18N: Updated Arabic translation diff --git a/src/torrentadditiondlg.cpp b/src/torrentadditiondlg.cpp index f7e91a4d2..e400e4998 100644 --- a/src/torrentadditiondlg.cpp +++ b/src/torrentadditiondlg.cpp @@ -30,7 +30,7 @@ #include "torrentadditiondlg.h" -torrentAdditionDialog::torrentAdditionDialog(GUI *parent, Bittorrent* _BTSession) : QDialog((QWidget*)parent), old_label(""), hidden_height(0) { +torrentAdditionDialog::torrentAdditionDialog(GUI *parent, Bittorrent* _BTSession) : QDialog((QWidget*)parent), old_label(""), hidden_height(0), cursor_pos(-1) { setupUi(this); setAttribute(Qt::WA_DeleteOnClose); connect(this, SIGNAL(torrentPaused(QTorrentHandle&)), parent->getTransferList(), SLOT(pauseTorrent(QTorrentHandle&))); @@ -641,9 +641,12 @@ void torrentAdditionDialog::renameSelectedFile() { void torrentAdditionDialog::restoreCursorPosition() { savePathTxt->lineEdit()->setCursorPosition(cursor_pos); + cursor_pos = -1; } void torrentAdditionDialog::updateSavePathCurrentText(QString path) { + if(cursor_pos >= 0) + return; Q_UNUSED(path); cursor_pos = savePathTxt->lineEdit()->cursorPosition(); savePathTxt->setItemText(savePathTxt->currentIndex(), path);