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
This commit is contained in:
Dominik Riebeling 2009-07-04 18:00:13 +00:00
parent a967308799
commit 5de08ea834

View file

@ -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();