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

Added missing spot units conversion

This commit is contained in:
Martin Tůma 2019-05-12 15:43:46 +02:00
parent a3d22dcd2a
commit beb93bcd1f
3 changed files with 10 additions and 1 deletions

View File

@ -825,6 +825,11 @@ bool Style::isContourLine(quint32 type)
|| type == TYPE(0x23) || type == TYPE(0x24) || type == TYPE(0x25));
}
bool Style::isSpot(quint32 type)
{
return (type == TYPE(0x62) || type == TYPE(0x63));
}
#ifndef QT_NO_DEBUG
static QString penColor(const QPen &pen)
{

View File

@ -90,6 +90,7 @@ public:
const QList<quint32> &drawOrder() const {return _drawOrder;}
static bool isContourLine(quint32 type);
static bool isSpot(quint32 type);
private:
struct Section {

View File

@ -267,7 +267,7 @@ void IMGMap::drawPoints(QPainter *painter, QList<IMG::Point> &points)
QVector<TextPointItem> items;
for (int i = 0; i < points.size(); i++) {
const IMG::Point &point = points.at(i);
IMG::Point &point = points[i];
const Style::Point &style = _img.style().point(point.type);
if (point.poi && _zoom < POI_MIN_ZOOM)
@ -300,6 +300,9 @@ void IMGMap::drawPoints(QPainter *painter, QList<IMG::Point> &points)
if (!label && !img)
continue;
if (Style::isSpot(point.type))
convertUnits(point.label);
TextPointItem item(ll2xy(point.coordinates).toPoint(), label, font, img,
color);
if (!item.collides(items))