Commit c7caa116 authored by Torsten Rahn's avatar Torsten Rahn Committed by Torsten Rahn
Browse files

Let's avoid having street labels disappear suddenly close to

 the viewport borders as much as we can ..
parent a8a427ab
......@@ -571,8 +571,9 @@ void GeoPainter::drawPolyline ( const GeoDataLineString & lineString,
for (int k = 0; k < numLabels; ++k, startPercent += textRelativeLength + offset) {
QPointF point = path.pointAtPercent(startPercent);
QPointF endPoint = path.pointAtPercent(startPercent + textRelativeLength);
if ( viewport().contains(point.toPoint()) ) {
if ( viewport().contains(point.toPoint()) || viewport().contains(endPoint.toPoint()) ) {
qreal angle = -path.angleAtPercent(startPercent);
qreal angle2 = -path.angleAtPercent(startPercent + textRelativeLength);
angle = GeoPainterPrivate::normalizeAngle(angle);
......
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