Fix assertion on Ctrl-N with Qt4.5.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29473 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-05-01 13:11:22 +00:00
parent 728380c06f
commit 695385374f

View File

@ -272,6 +272,9 @@ void GuiWorkArea::init()
} }
screen_ = QPixmap(viewport()->width(), viewport()->height()); screen_ = QPixmap(viewport()->width(), viewport()->height());
// With Qt4.5 a mouse event will happen before the first paint event
// so make sure that the buffer view has an up to date metrics.
buffer_view_->resize(viewport()->width(), viewport()->height());
cursor_ = new frontend::CursorWidget(); cursor_ = new frontend::CursorWidget();
cursor_->hide(); cursor_->hide();