1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-09 11:33:03 +02:00

Compare commits

..

No commits in common. "54d6016b1aa26591a4671ca3632c3e8b133904d0" and "f057ebdbb7e723622bdea0c709f2150a432b365d" have entirely different histories.

2 changed files with 6 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 180 B

View File

@ -136,27 +136,6 @@ static QImage *image(uint type, const QVariant &param)
return 0; return 0;
} }
static TextPointItem *pointItem(const QPoint &pos, const QString *label,
const QFont *fnt, const QImage *img, const QColor *color,
const QColor *hColor, const QList<TextItem*> &textItems)
{
TextPointItem *item = new TextPointItem(pos, label, fnt, img, color,
hColor, 0, ICON_PADDING);
if (item->isValid() && !item->collides(textItems))
return item;
delete item;
if (!img)
return 0;
item = new TextPointItem(pos, 0, 0, img, 0, 0, 0, 0);
if (item->isValid() && !item->collides(textItems))
return item;
delete item;
return 0;
}
QPainterPath RasterTile::painterPath(const Polygon &polygon) const QPainterPath RasterTile::painterPath(const Polygon &polygon) const
{ {
QPainterPath path; QPainterPath path;
@ -338,9 +317,9 @@ void RasterTile::processPoints(QList<TextItem*> &textItems,
continue; continue;
QPoint pos(ll2xy(point->pos()).toPoint()); QPoint pos(ll2xy(point->pos()).toPoint());
TextPointItem *item = pointItem(pos, label, fnt, img, color, hColor, TextPointItem *item = new TextPointItem(pos, label, fnt, img, color,
textItems); hColor, 0, ICON_PADDING);
if (item) { if (item->isValid() && !item->collides(textItems)) {
textItems.append(item); textItems.append(item);
if (rimg) if (rimg)
images.append(rimg); images.append(rimg);
@ -348,8 +327,10 @@ void RasterTile::processPoints(QList<TextItem*> &textItems,
lights.append(new TextPointItem(pos, 0, 0, light(), 0, 0, 0, 0)); lights.append(new TextPointItem(pos, 0, 0, light(), 0, 0, 0, 0));
if (signalsMap.contains(point->pos())) if (signalsMap.contains(point->pos()))
lights.append(new TextPointItem(pos, 0, 0, signal(), 0, 0, 0, 0)); lights.append(new TextPointItem(pos, 0, 0, signal(), 0, 0, 0, 0));
} else } else {
delete item;
delete rimg; delete rimg;
}
} }
} }