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:
parent
0156d2fbc0
commit
d9c922aa47
@ -4,13 +4,6 @@
|
|||||||
|
|
||||||
#define GRID_WIDTH 0
|
#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,
|
void GridItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget)
|
QWidget *widget)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
class GridItem : public QGraphicsItem
|
class GridItem : public QGraphicsItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GridItem(QGraphicsItem *parent = 0);
|
GridItem(QGraphicsItem *parent = 0): QGraphicsItem(parent) {}
|
||||||
|
|
||||||
QRectF boundingRect() const {return _boundingRect;}
|
QRectF boundingRect() const {return _boundingRect;}
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
Loading…
Reference in New Issue
Block a user