]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView2.C
Fixed cut&paste bugs and added freespacing for ERT Insets.
[lyx.git] / src / BufferView2.C
index 9641a26017f0d7ef7483e8300f3f0e064a8fe64e..0d5d4c10a418bd6a90f4c40242f5a36808a80994 100644 (file)
@@ -264,10 +264,6 @@ void BufferView::copyEnvironment()
 {
        if (available()) {
                text->copyEnvironmentType();
-               // clear the selection, even if mark_set
-               toggleSelection();
-               text->clearSelection();
-               update(text, BufferView::SELECT|BufferView::FITCUR);
                owner()->message(_("Paragraph environment type copied"));
        }
 }
@@ -287,12 +283,6 @@ void BufferView::copy()
 {
        if (available()) {
                text->copySelection(this);
-#if 0
-               // clear the selection, even if mark_set
-               toggleSelection();
-               text->clearSelection();
-               update(text, BufferView::SELECT|BufferView::FITCUR);
-#endif
                owner()->message(_("Copy"));
        }
 }
@@ -400,6 +390,9 @@ void BufferView::replaceWord(string const & replacestring)
 
 bool BufferView::lockInset(UpdatableInset * inset)
 {
+       // don't relock if we're already locked
+       if (theLockingInset() == inset)
+               return true;
        if (!theLockingInset() && inset) {
                theLockingInset(inset);
                return true;