mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 02:54:09 +00:00
Work-around for bug #5957.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30794 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1a1b6147d4
commit
fc5dec8da5
@ -168,7 +168,17 @@ bool GuiImage::scale(Params const & params)
|
|||||||
if (params.scale == 100)
|
if (params.scale == 100)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
qreal const scale = qreal(params.scale) / 100.0;
|
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%.
|
||||||
|
// 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;
|
||||||
|
#endif
|
||||||
|
|
||||||
QMatrix m;
|
QMatrix m;
|
||||||
m.scale(scale, scale);
|
m.scale(scale, scale);
|
||||||
transformed_ = image.transformed(m);
|
transformed_ = image.transformed(m);
|
||||||
|
Loading…
Reference in New Issue
Block a user