summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index f110a5c..b407eef 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -673,6 +673,7 @@
#include <QtCore/qtimer.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qnumeric.h>
#include <QtGui/qapplication.h>
#include <QtGui/qbitmap.h>
#include <QtGui/qpainter.h>
@@ -3483,7 +3484,10 @@ void QGraphicsItem::setX(qreal x)
if (d_ptr->inDestructor)
return;
- d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y()));
+ if (qIsNaN(x))
+ return;
+
+ setPos(QPointF(x, d_ptr->pos.y()));
}
/*!
@@ -3507,7 +3511,10 @@ void QGraphicsItem::setY(qreal y)
if (d_ptr->inDestructor)
return;
- d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y));
+ if (qIsNaN(y))
+ return;
+
+ setPos(QPointF(d_ptr->pos.x(), y));
}
/*!
@@ -3575,7 +3582,7 @@ void QGraphicsItem::setPos(const QPointF &pos)
return;
// Update and repositition.
- if (!(d_ptr->flags & ItemSendsGeometryChanges)) {
+ if (!(d_ptr->flags & ItemSendsGeometryChanges) && !(d_ptr->flags & ItemSendsScenePositionChanges)) {
d_ptr->setPosHelper(pos);
return;
}
@@ -11037,7 +11044,7 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
// Item coordinates with info.
QTransform newEffectTransform = info->transformPtr->inverted();
newEffectTransform *= effectTransform;
- scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, info->exposedRegion,
+ scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, 0,
info->widget, info->opacity, &newEffectTransform, info->wasDirtySceneTransform,
info->drawItem);
}
@@ -11242,7 +11249,7 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags)
{
debug << '(';
bool f = false;
- for (int i = 0; i < 16; ++i) {
+ for (int i = 0; i < 17; ++i) {
if (flags & (1 << i)) {
if (f)
debug << '|';