From d0debb73cf5060553a95cc5d22cdfdafbcf0ef6d Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Thu, 21 Jul 2011 08:47:20 +0000 Subject: [PATCH] move spellchecker backend change action to actOnUpdatedPrefs where it belongs to, add missing action for change of spellchecker_accept_compound preference git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39360 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXRC.cpp | 5 +++++ src/frontends/qt4/GuiApplication.cpp | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 1d7b3c3d8e..4211685313 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -26,6 +26,7 @@ #include "LyX.h" #include "Mover.h" #include "Session.h" +#include "SpellChecker.h" #include "version.h" #include "graphics/GraphicsTypes.h" @@ -2903,6 +2904,8 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) switch (tag) { case LyXRC::RC_LAST: case LyXRC::RC_ACCEPT_COMPOUND: + if (lyxrc_orig.spellchecker_accept_compound != lyxrc_new.spellchecker_accept_compound) + if (theSpellChecker()) theSpellChecker()->advanceChangeNumber(); case LyXRC::RC_ALT_LANG: case LyXRC::RC_PLAINTEXT_LINELEN: case LyXRC::RC_AUTOCORRECTION_MATH: @@ -3024,6 +3027,8 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_SHOW_BANNER: case LyXRC::RC_OPEN_BUFFERS_IN_TABS: case LyXRC::RC_SPELLCHECKER: + if (lyxrc_orig.spellchecker != lyxrc_new.spellchecker) + setSpellChecker(); case LyXRC::RC_SPELLCHECK_CONTINUOUSLY: case LyXRC::RC_SPELLCHECK_NOTES: case LyXRC::RC_SPLITINDEX_COMMAND: diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index ccd743f72f..e855119323 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1439,7 +1439,6 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) } actOnUpdatedPrefs(lyxrc_orig, lyxrc); - setSpellChecker(); resetGui(); break; -- 2.39.5