@@ -1480,7 +1480,7 @@ void QgsComposerMap::drawGrid( QPainter* p )
14801480 {
14811481 // start mark
14821482 crossEnd1 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( vIt->second .p1 (), vIt->second .p2 (), mCrossLength );
1483- drawGridLine ( QLineF ( vIt->second .p1 (), crossEnd1 ), context );
1483+ drawGridLine ( QLineF ( vIt->second .p1 () * dotsPerMM , crossEnd1 * dotsPerMM ), context );
14841484
14851485 // test for intersection with every horizontal line
14861486 hIt = horizontalLines.constBegin ();
@@ -1490,20 +1490,20 @@ void QgsComposerMap::drawGrid( QPainter* p )
14901490 {
14911491 crossEnd1 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( intersectionPoint, vIt->second .p1 (), mCrossLength );
14921492 crossEnd2 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( intersectionPoint, vIt->second .p2 (), mCrossLength );
1493- drawGridLine ( QLineF ( crossEnd1, crossEnd2 ), context );
1493+ drawGridLine ( QLineF ( crossEnd1 * dotsPerMM , crossEnd2 * dotsPerMM ), context );
14941494 }
14951495 }
14961496 // end mark
14971497 QPointF crossEnd2 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( vIt->second .p2 (), vIt->second .p1 (), mCrossLength );
1498- drawGridLine ( QLineF ( vIt->second .p2 (), crossEnd2 ), context );
1498+ drawGridLine ( QLineF ( vIt->second .p2 () * dotsPerMM , crossEnd2 * dotsPerMM ), context );
14991499 }
15001500
15011501 hIt = horizontalLines.constBegin ();
15021502 for ( ; hIt != horizontalLines.constEnd (); ++hIt )
15031503 {
15041504 // start mark
15051505 crossEnd1 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( hIt->second .p1 (), hIt->second .p2 (), mCrossLength );
1506- drawGridLine ( QLineF ( hIt->second .p1 (), crossEnd1 ), context );
1506+ drawGridLine ( QLineF ( hIt->second .p1 () * dotsPerMM , crossEnd1 * dotsPerMM ), context );
15071507
15081508 vIt = verticalLines.constBegin ();
15091509 for ( ; vIt != verticalLines.constEnd (); ++vIt )
@@ -1512,12 +1512,12 @@ void QgsComposerMap::drawGrid( QPainter* p )
15121512 {
15131513 crossEnd1 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( intersectionPoint, hIt->second .p1 (), mCrossLength );
15141514 crossEnd2 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( intersectionPoint, hIt->second .p2 (), mCrossLength );
1515- drawGridLine ( QLineF ( crossEnd1, crossEnd2 ), context );
1515+ drawGridLine ( QLineF ( crossEnd1 * dotsPerMM , crossEnd2 * dotsPerMM ), context );
15161516 }
15171517 }
15181518 // end mark
15191519 crossEnd1 = QgsSymbolLayerV2Utils::pointOnLineWithDistance ( hIt->second .p2 (), hIt->second .p1 (), mCrossLength );
1520- drawGridLine ( QLineF ( hIt->second .p2 (), crossEnd1 ), context );
1520+ drawGridLine ( QLineF ( hIt->second .p2 () * dotsPerMM , crossEnd1 * dotsPerMM ), context );
15211521 }
15221522 }
15231523 // reset composition mode
0 commit comments