From 496f7a23fd8ec2725d7d6cb6757f2df96fde5c3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 17 Oct 2010 12:06:47 +0000 Subject: [PATCH] Fix bug 6650: Error Messages Repeated git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35664 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Cursor.cpp | 1 + src/Text.cpp | 20 +++++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 16067119e3..45745798da 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -332,6 +332,7 @@ void Cursor::dispatch(FuncRequest const & cmd0) fixIfBroken(); FuncRequest cmd = cmd0; Cursor safe = *this; + disp_ = DispatchResult(); buffer()->undo().beginUndoGroup(); diff --git a/src/Text.cpp b/src/Text.cpp index 77385f0419..d00d2d5356 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -936,23 +936,17 @@ void Text::insertChar(Cursor & cur, char_type c) // disable the double-space checking if (!freeSpacing && isLineSeparatorChar(c)) { if (cur.pos() == 0) { - static bool sent_space_message = false; - if (!sent_space_message) { - cur.message(_("You cannot insert a space at the " - "beginning of a paragraph. Please read the Tutorial.")); - sent_space_message = true; - } + cur.message(_( + "You cannot insert a space at the " + "beginning of a paragraph. Please read the Tutorial.")); return; } LASSERT(cur.pos() > 0, /**/); if ((par.isLineSeparator(cur.pos() - 1) || par.isNewline(cur.pos() - 1)) - && !par.isDeleted(cur.pos() - 1)) { - static bool sent_space_message = false; - if (!sent_space_message) { - cur.message(_("You cannot type two spaces this way. " - "Please read the Tutorial.")); - sent_space_message = true; - } + && !par.isDeleted(cur.pos() - 1)) { + cur.message(_( + "You cannot type two spaces this way. " + "Please read the Tutorial.")); return; } } -- 2.39.2