diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-02 12:00:03 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:31:00 (GMT) |
commit | 6f218ce216021ff2e8ecf828b2f29b1b9d82b401 (patch) | |
tree | c97be6097ccba8f0b3579017c2eacada750de7e2 /src/gui/graphicsview/qgraphicsitem_p.h | |
parent | d44332954b2a8e66ba4129c230e8ccc65fd972ea (diff) | |
download | Qt-6f218ce216021ff2e8ecf828b2f29b1b9d82b401.zip Qt-6f218ce216021ff2e8ecf828b2f29b1b9d82b401.tar.gz Qt-6f218ce216021ff2e8ecf828b2f29b1b9d82b401.tar.bz2 |
Microoptimize: make this function inline.
Also change the order of comparisons, as the transformable flags are
most likely to fail first.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index d962ad0..61f6496 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -160,7 +160,11 @@ public: void setIsMemberOfGroup(bool enabled); void remapItemPos(QEvent *event, QGraphicsItem *item); QPointF genericMapFromScene(const QPointF &pos, const QWidget *viewport) const; - bool itemIsUntransformable() const; + inline bool itemIsUntransformable() const + { + return (flags & QGraphicsItem::ItemIgnoresTransformations) + || (ancestorFlags & AncestorIgnoresTransformations); + } void combineTransformToParent(QTransform *x, const QTransform *viewTransform = 0) const; void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = 0) const; |