From: Stephan Witt Date: Thu, 24 Mar 2011 11:49:34 +0000 (+0000) Subject: #7379 avoid the wrap spell check question when buffer is empty X-Git-Tag: 2.0.0~442 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e6f46dd08c0e1ea040f7d085344d4fd568674cec;p=features.git #7379 avoid the wrap spell check question when buffer is empty git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38023 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index a1818b1028..3497ad97c3 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -24,6 +24,7 @@ #include "BufferView.h" #include "buffer_funcs.h" #include "Cursor.h" +#include "Text.h" #include "CutAndPaste.h" #include "FuncRequest.h" #include "Language.h" @@ -290,7 +291,7 @@ void SpellcheckerWidget::Private::updateSuggestions(docstring_list & words) void SpellcheckerWidget::Private::check() { BufferView * bv = gv_->documentBufferView(); - if (!bv) + if (!bv || bv->buffer().text().empty()) return; DocIterator from = bv->cursor();