mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
* src/frontends/qt4/QSpellchecker.cpp:
- fix bug 2218 (spellchecher skips first word) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21470 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9bb559d543
commit
452d7e28c0
@ -147,8 +147,30 @@ void QSpellchecker::build_dialog()
|
||||
|
||||
void QSpellchecker::update_contents()
|
||||
{
|
||||
if (isVisible() || controller().exitEarly())
|
||||
// The clauses below are needed because the spellchecker
|
||||
// controller has many flaws (see bugs 1950, 2218).
|
||||
// Basically, we have to distinguish the case where a
|
||||
// spellcheck has already been performed for the whole
|
||||
// document (exitEarly() == true, isVisible() == false)
|
||||
// from the rest (exitEarly() == false, isVisible() == true).
|
||||
static bool check_after_early_exit;
|
||||
if (controller().exitEarly()) {
|
||||
// a spellcheck has already been performed,
|
||||
controller().check();
|
||||
check_after_early_exit = true;
|
||||
}
|
||||
else if (isVisible()) {
|
||||
// the above check triggers a second update,
|
||||
// and isVisible() is true then. Prevent a
|
||||
// second check that skips the first word
|
||||
if (check_after_early_exit)
|
||||
// don't check, but reset the bool.
|
||||
// business as usual after this.
|
||||
check_after_early_exit = false;
|
||||
else
|
||||
// perform spellcheck (default case)
|
||||
controller().check();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,6 +123,9 @@ What's new
|
||||
- Fix a bug where the spellchecker didn't update the screen display on the last
|
||||
of several misspelt words (bug 3586).
|
||||
|
||||
- Fix a bug where the spellchecker skipped the first misspelled word on a second
|
||||
run (bug 2218).
|
||||
|
||||
- Do not close the error dialog on double click (bug 4090).
|
||||
|
||||
- Fix cut and paste of tabular cells via the external clipboard (bug 4147).
|
||||
|
Loading…
Reference in New Issue
Block a user