From 1a681aaf240feb508a9802e46049c4781f785f46 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Tue, 28 Sep 2010 15:09:06 +0000 Subject: [PATCH] #6917 move forward after adding a word to personal dictionary or the list of ignored words git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35525 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiSpellchecker.cpp | 12 ++++++++++-- src/frontends/qt4/GuiSpellchecker.h | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index e8cf7b25e7..4059a7be93 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -157,6 +157,13 @@ void GuiSpellchecker::updateView() } +void GuiSpellchecker::forward() +{ + dispatch(FuncRequest(LFUN_ESCAPE)); + dispatch(FuncRequest(LFUN_CHAR_FORWARD)); +} + + void GuiSpellchecker::on_languageCO_activated(int index) { string const lang = @@ -174,6 +181,7 @@ void GuiSpellchecker::on_ignoreAllPB_clicked() /// replace all occurrences of word if (d->word_.lang() && !d->word_.word().empty()) theSpellChecker()->accept(d->word_); + forward(); check(); } @@ -182,14 +190,14 @@ void GuiSpellchecker::on_addPB_clicked() { /// insert word in personal dictionary theSpellChecker()->insert(d->word_); + forward(); check(); } void GuiSpellchecker::on_ignorePB_clicked() { - dispatch(FuncRequest(LFUN_ESCAPE)); - dispatch(FuncRequest(LFUN_CHAR_FORWARD)); + forward(); check(); } diff --git a/src/frontends/qt4/GuiSpellchecker.h b/src/frontends/qt4/GuiSpellchecker.h index 002a869ac9..7c5d164eb2 100644 --- a/src/frontends/qt4/GuiSpellchecker.h +++ b/src/frontends/qt4/GuiSpellchecker.h @@ -58,8 +58,9 @@ private: bool needBufferOpen() const { return true; } ///} + /// move to next position after current word + void forward(); /// check text until next misspelled/unknown word - /// returns true when finished void check(); /// show count of checked words at normal exit void showSummary();