1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fixed visual artefacts on transparent tiles

This commit is contained in:
Martin Tůma 2018-02-22 00:50:45 +01:00
parent b054cf9046
commit a6cf88aa92

View File

@ -761,17 +761,14 @@ void MapView::setBackgroundColor(const QColor &color)
void MapView::drawBackground(QPainter *painter, const QRectF &rect)
{
painter->fillRect(rect, _backgroundColor);
if (_showMap) {
QRectF ir = rect.intersected(_map->bounds());
if (_opacity < 1.0 || ir != rect)
painter->fillRect(rect, _backgroundColor);
if (_opacity < 1.0)
painter->setOpacity(_opacity);
_map->draw(painter, ir);
} else
painter->fillRect(rect, _backgroundColor);
}
}
void MapView::resizeEvent(QResizeEvent *event)