]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Some more cleanup of LyXView:
[lyx.git] / src / BufferView.cpp
index 83ce588a8b6dc314a59d04d1c0065334fe0220e5..4bd4a99c242a7eb52520b1e9e9c397598c1d3bef 100644 (file)
@@ -647,8 +647,13 @@ bool BufferView::moveToPosition(pit_type bottom_pit, pos_type bottom_pos,
                setCursor(doc_it);
                // set the current font.
                d->cursor_.setCurrentFont();
-               // center the screen on this new position.
-               center();
+               // To center the screen on this new position we need the
+               // paragraph position which is computed at draw() time.
+               // So we need a redraw!
+               buffer_.changed();
+               if (fitCursor())
+                       // We need another redraw because of the screen recentering.
+                       buffer_.changed();
        }
 
        return success;
@@ -1970,23 +1975,15 @@ void BufferView::message(docstring const & msg)
 void BufferView::showDialog(std::string const & name)
 {
        if (d->gui_)
-               d->gui_->showDialog(name);
-}
-
-
-void BufferView::showDialogWithData(std::string const & name,
-       std::string const & data)
-{
-       if (d->gui_)
-               d->gui_->showDialogWithData(name, data);
+               d->gui_->showDialog(name, string());
 }
 
 
-void BufferView::showInsetDialog(std::string const & name,
+void BufferView::showDialog(std::string const & name,
        std::string const & data, Inset * inset)
 {
        if (d->gui_)
-               d->gui_->showInsetDialog(name, data, inset);
+               d->gui_->showDialog(name, data, inset);
 }