]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
Fix bug 2485 and crash on middle mouse paste on math
[lyx.git] / src / BufferView.C
index 31e01b155bae53be96e9146e4d8f931687d0ee63..151d1154553daae676e6426ade0d22a301723576 100644 (file)
@@ -188,6 +188,10 @@ bool BufferView::isSavedPosition(unsigned int i)
        return pimpl_->isSavedPosition(i);
 }
 
+void BufferView::saveSavedPositions()
+{
+       return pimpl_->saveSavedPositions();
+}
 
 void BufferView::switchKeyMap()
 {
@@ -332,6 +336,26 @@ void BufferView::setCursor(DocIterator const & dit)
 }
 
 
+void BufferView::mouseSetCursor(LCursor & cur)
+{
+       BOOST_ASSERT(&cur.bv() == this);
+
+       // Has the cursor just left the inset?
+       if (&cursor().inset() != &cur.inset())
+               cursor().inset().notifyCursorLeaves(cursor());
+
+       // do the dEPM magic if needed
+       if (cursor().inTexted())
+               cursor().text()->deleteEmptyParagraphMechanism(cur, cursor());
+
+       cursor() = cur;
+       cursor().clearSelection();
+       cursor().setTargetX();
+       finishUndo();
+
+}
+
+
 void BufferView::putSelectionAt(DocIterator const & cur,
                                int length, bool backwards)
 {
@@ -349,6 +373,18 @@ void BufferView::putSelectionAt(DocIterator const & cur,
 }
 
 
+bool const BufferView::repaintAll() const
+{
+       return pimpl_->repaintAll();
+}
+
+
+void const BufferView::repaintAll(bool r) const
+{
+       pimpl_->repaintAll(r);
+}
+
+
 LCursor & BufferView::cursor()
 {
        return pimpl_->cursor_;