Commit aab20dfb authored by Torsten Rahn's avatar Torsten Rahn Committed by Torsten Rahn

Fix horizontal polygon cut-off which occurs when the window height

is bigger than the window width.
Seen in https://www.youtube.com/watch?v=Dd_x7XZg_-8
parent 01c62400
......@@ -792,7 +792,7 @@ void GeoPainter::drawPolygon ( const GeoDataPolygon & polygon,
if (innerBoundariesOnScreen) {
// Cut the outer polygons to the viewport
QVector<QPointF> viewportPolygon = QPolygonF(QRectF(0, 0, d->m_viewport->width(), d->m_viewport->width()));
QVector<QPointF> viewportPolygon = QPolygonF(QRectF(0, 0, d->m_viewport->width(), d->m_viewport->height()));
foreach(QPolygonF* outerPolygon, outerPolygons) {
*outerPolygon = outerPolygon->intersected(QPolygonF(viewportPolygon));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment