From 74fba0fb7ec45231f3489175896aeb7fffef4b04 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 26 Sep 2010 17:08:16 +0000 Subject: [PATCH] Really fix manual editing of save path in torrent addition dialog --- src/torrentadditiondlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);