]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
More 'standard conformant blurb' nonsense.
[lyx.git] / src / BufferView_pimpl.C
index e47e994ac54e74e35ce7ecaaf3bf9cfdde0f5e2b..222c5a0b71dc31c02f3e7c7ee6f00be90ac6db10 100644 (file)
@@ -427,6 +427,10 @@ void BufferView::Pimpl::resizeCurrentBuffer()
                selendpar = bv_->text->ownerParagraphs().end();
        }
 
+#warning does not help much
+       bv_->text->redoParagraphs(bv_->text->ownerParagraphs().begin(),
+               bv_->text->ownerParagraphs().end());
+
        if (par != bv_->text->ownerParagraphs().end()) {
                bv_->text->selection.set(true);
                // At this point just to avoid the Delete-Empty-Paragraph-
@@ -485,7 +489,8 @@ void BufferView::Pimpl::scrollDocView(int value)
 
        screen().hideCursor();
 
-       screen().draw(bv_->text, bv_, value);
+       bv_->text->top_y(value);
+       //screen().draw();
 
        if (!lyxrc.cursor_follows_scrollbar)
                return;
@@ -763,14 +768,14 @@ void BufferView::Pimpl::insetUnlock()
 
 void BufferView::Pimpl::center()
 {
-       LyXText * t = bv_->text;
+       LyXText * text = bv_->text;
 
-       beforeChange(t);
+       beforeChange(text);
        int const half_height = workarea().workHeight() / 2;
        int new_y = 0;
 
-       if (t->cursor.y() > half_height)
-               new_y = t->cursor.y() - half_height;
+       if (text->cursor.y() > half_height)
+               new_y = text->cursor.y() - half_height;
 
        // FIXME: look at this comment again ...
 
@@ -783,8 +788,8 @@ void BufferView::Pimpl::center()
        // and also might have moved top_y() must make sure to call
        // updateScrollbar() currently. Never mind that this is a
        // pretty obfuscated way of updating t->top_y()
-       screen().draw(t, bv_, new_y);
-
+       text->top_y(new_y);
+       //screen().draw();
        update();
 }
 
@@ -813,7 +818,7 @@ InsetOld * BufferView::Pimpl::getInsetByCode(InsetOld::Code code)
        return it != buffer_->inset_iterator_end() ? (*it) : 0;
 #else
        // Ok, this is a little bit too brute force but it
-       // should work for now. Better infrastructure is comming. (Lgb)
+       // should work for now. Better infrastructure is coming. (Lgb)
 
        Buffer * b = bv_->buffer();
        LyXCursor cursor = bv_->getLyXText()->cursor;
@@ -1175,7 +1180,6 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
                        if (name == "bibitem") {
                                // We need to do a redraw because the maximum
                                // InsetBibitem width could have changed
-                               bv_->fitCursor();
 #warning check whether the update() is needed at all
                                bv_->update();
                        }
@@ -1197,12 +1201,8 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
                break;
 
        case LFUN_LAYOUT_PARAGRAPH: {
-               Paragraph const * par = &*bv_->getLyXText()->cursor.par();
-               if (!par)
-                       break;
-
                string data;
-               params2string(*par, data);
+               params2string(*bv_->getLyXText()->cursor.par(), data);
 
                data = "show\n" + data;
                bv_->owner()->getDialogs().show("paragraph", data);