From 5de08ea834e2fc146092a43eeb7fb508f6ae09db Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 4 Jul 2009 18:00:13 +0000 Subject: [PATCH] When changing TTS settings from the talkfile dialog make sure to not reset the currently selected folder if its valid. Fixes FS#10409. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21637 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/installtalkwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rbutil/rbutilqt/installtalkwindow.cpp b/rbutil/rbutilqt/installtalkwindow.cpp index f225632f22..40f96e724f 100644 --- a/rbutil/rbutilqt/installtalkwindow.cpp +++ b/rbutil/rbutilqt/installtalkwindow.cpp @@ -67,7 +67,13 @@ void InstallTalkWindow::setTalkFolder(QString folder) void InstallTalkWindow::change() { Config *cw = new Config(this,4); - + + // make sure the current selected folder doesn't get lost on settings + // changes. If the current selection is invalid don't accept it so + // it gets reset to the old value after closing the settings dialog. + QString folderToTalk = ui.lineTalkFolder->text(); + if(QFileInfo(folderToTalk).isDir()) + RbSettings::setValue(RbSettings::LastTalkedFolder, folderToTalk); connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); cw->show();