]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
mathed31.diff
[lyx.git] / src / BufferView_pimpl.C
index d06dfb2eed5ef1f77a37e3867268f859baa1fea8..dff6e8a53eac36c82d505cf1e572ceac95f45583 100644 (file)
@@ -76,11 +76,7 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
        : bv_(b), owner_(o), cursor_timeout(400)
 {
        buffer_ = 0;
-#if 0
-       workarea_ = new WorkArea(bv_, xpos, ypos, width, height);
-#else
        workarea_ = new WorkArea(xpos, ypos, width, height);
-#endif
        // Setup the signals
        workarea_->scrollCB.connect(slot(this, &BufferView::Pimpl::scrollCB));
        workarea_->workAreaExpose
@@ -246,6 +242,8 @@ int BufferView::Pimpl::resizeCurrentBuffer()
        LyXParagraph * par = 0;
        LyXParagraph * selstartpar = 0;
        LyXParagraph * selendpar = 0;
+       UpdatableInset * the_locking_inset;
+       
        int pos = 0;
        int selstartpos = 0;
        int selendpos = 0;
@@ -265,6 +263,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
                selendpos = bv_->text->sel_end_cursor.pos();
                selection = bv_->text->selection;
                mark_set = bv_->text->mark_set;
+               the_locking_inset = bv_->text->the_locking_inset;
                delete bv_->text;
                bv_->text = new LyXText(bv_);
        } else {
@@ -302,6 +301,8 @@ int BufferView::Pimpl::resizeCurrentBuffer()
                        bv_->text->sel_cursor = bv_->text->cursor;
                        bv_->text->selection = false;
                }
+               // remake the inset locking
+               bv_->text->the_locking_inset = the_locking_inset;
        }
        bv_->text->first = screen_->TopCursorVisible(bv_->text);
        buffer_->resizeInsets(bv_);