mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 19:49:15 +02:00
Do not draw IMG contour lines that have no color defined
This commit is contained in:
@ -297,7 +297,8 @@ void RasterTile::processStreetNames(const QList<MapData::Poly> &lines,
|
||||
const QFont *fnt = _data->style()->font(style.text().size(),
|
||||
Style::Small);
|
||||
const QColor *color = style.text().color().isValid()
|
||||
? &style.text().color() : 0;
|
||||
? &style.text().color() : Style::isContourLine(poly.type)
|
||||
? 0 : &textColor;
|
||||
const QColor *hColor = Style::isContourLine(poly.type) ? 0 : &haloColor;
|
||||
const QImage *img = poly.oneway
|
||||
? Style::isWaterLine(poly.type)
|
||||
@ -305,7 +306,7 @@ void RasterTile::processStreetNames(const QList<MapData::Poly> &lines,
|
||||
const QString *label = poly.label.text().isEmpty()
|
||||
? 0 : &poly.label.text();
|
||||
|
||||
if (!img && (!label || !fnt))
|
||||
if (!img && (!label || !fnt || !color))
|
||||
continue;
|
||||
|
||||
TextPathItem *item = new TextPathItem(poly.points, label, _rect, fnt,
|
||||
|
@ -1026,7 +1026,8 @@ bool Style::parseLine(SubFile *file, SubFile::Handle &hdl,
|
||||
|
||||
if (isContourLine(type)) {
|
||||
Line &l = _lines[type];
|
||||
l.setTextColor(l.foreground().color());
|
||||
if (l.img().isNull())
|
||||
l.setTextColor(l.foreground().color());
|
||||
l.setTextFontSize(Small);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user