two patches from john

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3479 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-02-04 11:30:25 +00:00
parent d2d30d45f1
commit 342932ad32
4 changed files with 19 additions and 0 deletions

View File

@ -742,6 +742,9 @@ void BufferView::Pimpl::tripleClick(int /*x*/, int /*y*/, unsigned int button)
void BufferView::Pimpl::selectionRequested()
{
if (!available())
return;
string const sel(bv_->getLyXText()->selectionAsString(bv_->buffer(),
false));
if (!sel.empty()) {

View File

@ -1,3 +1,8 @@
2002-02-01 John Levon <moz@compsoc.man.ac.uk>
* BufferView_pimpl.C: fix crash on close buffer
during selection (#227)
2002-01-27 Herbert Voss <voss@lyx.org>
* buffer.C: link old Figure to new graphic inset

View File

@ -1,3 +1,8 @@
2002-02-01 John Levon <moz@compsoc.man.ac.uk>
* ControlSpellchecker.C: clear any selection left
(bug #211)
2002-02-01 Herbert Voss <voss@lyx.org>
* ControlGraphics.[C] (readBB): search only, if it is a

View File

@ -34,6 +34,7 @@
#include "lyxrc.h"
#include "BufferView.h"
#include "LyXView.h"
#include "lyxtext.h"
#include "gettext.h"
#include "support/lstrings.h"
#include "language.h"
@ -109,6 +110,11 @@ void ControlSpellchecker::check()
result_ = SpellBase::ISP_OK;
stop_ = false;
// clear any old selection
LyXText * text = lv_.view()->getLyXText();
lv_.view()->toggleSelection(true);
lv_.view()->update(text, BufferView::SELECT);
while ((result_==SpellBase::ISP_OK || result_==SpellBase::ISP_IGNORE) &&
!stop_) {
word_ = lv_.view()->nextWord(newval_);