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;
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);
}