mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Do not try to draw labels outside the tile rect
This commit is contained in:
parent
62ae50ecda
commit
85fd574b38
@ -231,8 +231,13 @@ void RasterTile::processLineLabels(const QVector<PainterPath> &paths,
|
|||||||
void RasterTile::drawTextItems(QPainter *painter,
|
void RasterTile::drawTextItems(QPainter *painter,
|
||||||
const QList<TextItem*> &textItems)
|
const QList<TextItem*> &textItems)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < textItems.size(); i++)
|
QRectF rect(_rect);
|
||||||
textItems.at(i)->paint(painter);
|
|
||||||
|
for (int i = 0; i < textItems.size(); i++) {
|
||||||
|
const TextItem *ti = textItems.at(i);
|
||||||
|
if (rect.intersects(ti->boundingRect()))
|
||||||
|
ti->paint(painter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) const
|
QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) const
|
||||||
|
Loading…
Reference in New Issue
Block a user