From: Richard Heck Date: Sun, 16 Jan 2011 20:30:23 +0000 (+0000) Subject: We don't want to write an empty string here. Keep it the default, unless X-Git-Tag: 2.0.0~1078 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c8766b2e42ae6170f8cbdc2d326af6de02a8c414;p=features.git We don't want to write an empty string here. Keep it the default, unless something else has been provided. (This is only an issue when no spell checkers are detected.) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37234 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 2b36892a0f..3e4ada8e29 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1468,8 +1468,10 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form) void PrefSpellchecker::apply(LyXRC & rc) const { - rc.spellchecker = fromqstr(spellcheckerCB->itemData( - spellcheckerCB->currentIndex()).toString()); + string const speller = fromqstr(spellcheckerCB-> + itemData(spellcheckerCB->currentIndex()).toString()); + if (!speller.empty()) + rc.spellchecker = speller; rc.spellchecker_alt_lang = fromqstr(altLanguageED->text()); rc.spellchecker_esc_chars = fromqstr(escapeCharactersED->text()); rc.spellchecker_accept_compound = compoundWordCB->isChecked();