From 9506a284d16b92bc4970952ffbda16d48da3dbdc Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Sat, 2 Jun 2007 13:34:06 +0000 Subject: [PATCH] Fix bug 3363: mark buffer dirty after middle button paste in plain text and table; set cursor at the end of pasted text git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18632 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text3.cpp | 7 ++++--- src/insets/InsetTabular.cpp | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 396202436d..746eafb6d1 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1022,9 +1022,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) paste_internally = true; } - // we have to update after dePM triggered - bool update = bv->mouseSetCursor(cur); - // Insert primary selection with middle mouse // if there is a local selection in the current buffer, // insert this @@ -1034,11 +1031,15 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) bv->buffer()->errors("Paste"); cur.clearSelection(); // bug 393 bv->switchKeyMap(); + bv->buffer()->markDirty(); finishUndo(); } else lyx::dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph")); } + // we have to update after dePM triggered + bool update = bv->mouseSetCursor(cur); + if (!update && cmd.button() == mouse_button::button1) { needsUpdate = false; cur.noUpdate(); diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 2f078201fd..5d14a54eaf 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3212,6 +3212,8 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) "paragraph"); } doDispatch(cur, cmd); + cur.bv().buffer()->markDirty(); + cur.bv().mouseSetCursor(cur); } break; -- 2.39.2