1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Do not cache the grid, drawing it is faster

This commit is contained in:
Martin Tůma 2018-05-18 20:11:41 +02:00
parent 0156d2fbc0
commit d9c922aa47
2 changed files with 1 additions and 8 deletions

View File

@ -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)
{

View File

@ -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,