From 4782d3d62a71dccf20a0da56a78f5760273dfa65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 15 May 2002 23:50:48 +0000 Subject: [PATCH] pastesel.patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4172 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView2.C | 2 ++ src/BufferView_pimpl.C | 1 + src/ChangeLog | 5 +++++ src/insets/ChangeLog | 4 ++++ src/insets/insettext.C | 5 +++++ src/mathed/ChangeLog | 4 ++++ src/mathed/math_cursor.C | 2 +- 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/BufferView2.C b/src/BufferView2.C index 15753ac829..a3e6691c44 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -427,6 +427,8 @@ void BufferView::paste() // paste text->pasteSelection(this); + // bug 393 + text->clearSelection(); update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); // why fake a selection only I think it should be a real one and not only // a painted one (Jug 20020318). diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index e106c4181e..73e690de18 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -1530,6 +1530,7 @@ void BufferView::Pimpl::pasteClipboard(bool asPara) } else { bv_->getLyXText()->insertStringAsLines(bv_, clip); } + bv_->getLyXText()->clearSelection(); update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); } diff --git a/src/ChangeLog b/src/ChangeLog index 59b388e01d..7b281c4a3a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-05-15 John Levon + + * BufferView_pimpl.C: + * BufferView2.C: clear selection on paste (bug 393) + 2002-05-14 Lars Gullik Bjønnes * DepTable.C: include ctime diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index cee2d90a1b..a822796760 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2002-05-15 John Levon + + * insettext.C: clear selection on paste (bug 393) + 2002-05-11 Dekel Tsur * insettext.C (latex): Honor the moving_arg argument. diff --git a/src/insets/insettext.C b/src/insets/insettext.C index b375b56d1e..a433a3f35c 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -1379,6 +1379,9 @@ InsetText::localDispatch(BufferView * bv, } else { lt->insertStringAsLines(bv, clip); } + // bug 393 + lt->clearSelection(); + updwhat = CURSOR_PAR; updflag = true; break; @@ -1396,6 +1399,8 @@ InsetText::localDispatch(BufferView * bv, setUndo(bv, Undo::INSERT, lt->cursor.par(), lt->cursor.par()->next()); lt->pasteSelection(bv); + // bug 393 + lt->clearSelection(); updwhat = CURSOR_PAR; updflag = true; } diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 89296adacd..1c5f4acd6c 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2002-05-15 John Levon + + * math_cursor.C: clear selection on paste (bug 393) + 2002-05-15 André Pönitz * math_cursor.[Ch]: honor lyxrc setting for auto_delete_region diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index a68f33ce9f..209bcb8a97 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -691,7 +691,7 @@ void MathCursor::selPaste() selClearOrDel(); theSelection.paste(*this); //theSelection.grab(*this); - //selClear(); + selClear(); }