]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXView.C
Fix bug 3101 and 3108
[lyx.git] / src / frontends / LyXView.C
index 73699d16467c0c2dc4ab00aaf994f83e7c29fd4a..e6ad20d284129b7e6780b24da1a72db8492cc7b9 100644 (file)
@@ -100,6 +100,20 @@ void LyXView::setWorkArea(WorkArea * work_area)
 }
 
 
+// FIXME, there's only one WorkArea per LyXView possible for now.
+WorkArea const * LyXView::currentWorkArea() const
+{
+       return work_area_;
+}
+
+
+// FIXME, there's only one WorkArea per LyXView possible for now.
+WorkArea * LyXView::currentWorkArea()
+{
+       return work_area_;
+}
+
+
 Buffer * LyXView::buffer() const
 {
        BOOST_ASSERT(work_area_);
@@ -417,11 +431,10 @@ Buffer const * const LyXView::updateInset(InsetBase const * inset) const
 {
        Buffer const * buffer_ptr = 0;
        if (inset) {
-               buffer_ptr = work_area_->bufferView().buffer();
-               // No FitCursor:
                BOOST_ASSERT(work_area_);
-               work_area_->bufferView().update(Update::Force);
-               work_area_->redraw();
+               work_area_->sheduleRedraw();
+
+               buffer_ptr = work_area_->bufferView().buffer();
        }
        return buffer_ptr;
 }