From b92e1c3a96166a9ceeece3c9e090c7b75f7c627c Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 14 Aug 2009 15:08:04 +0000 Subject: [PATCH] branch: Adjust the work-around for bug #5957. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31032 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiImage.cpp | 10 ++++------ status.16x | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/frontends/qt4/GuiImage.cpp b/src/frontends/qt4/GuiImage.cpp index 5dd23f8fd8..0e53aadef4 100644 --- a/src/frontends/qt4/GuiImage.cpp +++ b/src/frontends/qt4/GuiImage.cpp @@ -170,13 +170,11 @@ bool GuiImage::scale(Params const & params) qreal scale = qreal(params.scale) / 100.0; -#if QT_VERSION >= 0x040500 - // Due to a bug in Qt, LyX will crash when scaling an - // image with an odd height to 50%. +#if (QT_VERSION >= 0x040500) && (QT_VERSION <= 0x040502) + // Due to a bug in Qt, LyX will crash for certain + // scaling factors and sizes of the image. // see bug #5957: http://www.lyx.org/trac/ticket/5957 - // FIXME: Add an upper version limit as soon as the bug is fixed in Qt. - if (params.scale == 50) - scale += 0.0001; + scale += 0.0001; #endif QMatrix m; diff --git a/status.16x b/status.16x index 5c323b65f4..998ac92203 100644 --- a/status.16x +++ b/status.16x @@ -183,8 +183,8 @@ What's new * USER INTERFACE -- Prevent a crash when scaling down an image with an odd height - to 50% on screen (part of bug 5957). +- Prevent a crash in Qt when scaling images on screen. This could occur + only for certain scaling factors and image sizes (bug 5957). - Fix bookmark navigation crash when multiple windows are used (bug 6000).