From d9c922aa4761231a2e56c9c4b66355a73fc437d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 18 May 2018 20:11:41 +0200 Subject: [PATCH] Do not cache the grid, drawing it is faster --- src/GUI/griditem.cpp | 7 ------- src/GUI/griditem.h | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/GUI/griditem.cpp b/src/GUI/griditem.cpp index 2f2b6591..299ca75b 100644 --- a/src/GUI/griditem.cpp +++ b/src/GUI/griditem.cpp @@ -4,13 +4,6 @@ #define GRID_WIDTH 0 -GridItem::GridItem(QGraphicsItem *parent) : QGraphicsItem(parent) -{ -#ifndef Q_OS_MAC - setCacheMode(QGraphicsItem::DeviceCoordinateCache); -#endif // Q_OS_MAC -} - void GridItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { diff --git a/src/GUI/griditem.h b/src/GUI/griditem.h index 058fca6e..8f8a6809 100644 --- a/src/GUI/griditem.h +++ b/src/GUI/griditem.h @@ -6,7 +6,7 @@ class GridItem : public QGraphicsItem { public: - GridItem(QGraphicsItem *parent = 0); + GridItem(QGraphicsItem *parent = 0): QGraphicsItem(parent) {} QRectF boundingRect() const {return _boundingRect;} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,