From 695385374fe218d67c153a1a9734a4b538659112 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 1 May 2009 13:11:22 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiWorkArea.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index a142122717..b0eb1e353f 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -272,6 +272,9 @@ void GuiWorkArea::init() } 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_->hide();