Backport r30399 in order to fix #6013 (I am not sure how to be more cryptic yet still useful)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30413 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-07-08 11:03:41 +00:00
parent 488b22bdf4
commit c88dd9924e
2 changed files with 7 additions and 2 deletions

View File

@ -430,6 +430,8 @@ void GuiSpellchecker::replace(docstring const & replacement)
LYXERR(Debug::GUI, "GuiSpellchecker::replace(" LYXERR(Debug::GUI, "GuiSpellchecker::replace("
<< to_utf8(replacement) << ")"); << to_utf8(replacement) << ")");
BufferView * bv = const_cast<BufferView *>(bufferview()); BufferView * bv = const_cast<BufferView *>(bufferview());
if (!bv->cursor().inTexted())
return;
cap::replaceSelectionWithString(bv->cursor(), replacement, true); cap::replaceSelectionWithString(bv->cursor(), replacement, true);
bv->buffer().markDirty(); bv->buffer().markDirty();
// If we used an LFUN, we would not need that // If we used an LFUN, we would not need that

View File

@ -129,8 +129,11 @@ What's new
- Fix assertion when pressing down arrow in the command buffer while - Fix assertion when pressing down arrow in the command buffer while
the history is empty (bug 6001). the history is empty (bug 6001).
- Fix assertion when selecting with Shift-button in math editor (bug - Fix assertion when selecting with Shift-button in math editor (bugs
6026). 5046 and 6026).
- Fix assertion when starting spellchecker in math mode and clicking
"replace" (bug 6013)
- Make Tools>Statistics ignore Note insets and inactive branches - Make Tools>Statistics ignore Note insets and inactive branches
(bug 2566). (bug 2566).