mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
fix #4843 again
This commit is contained in:
parent
c7f341e779
commit
d281277665
@ -69,11 +69,6 @@ void QgsHighlight::paintPoint( QPainter *p, QgsPoint point )
|
||||
{
|
||||
QPolygonF r( 5 );
|
||||
|
||||
if ( mLayer )
|
||||
{
|
||||
point = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, point );
|
||||
}
|
||||
|
||||
double d = mMapCanvas->extent().width() * 0.005;
|
||||
r[0] = toCanvasCoordinates( point + QgsVector( -d, -d ) ) - pos();
|
||||
r[1] = toCanvasCoordinates( point + QgsVector( d, -d ) ) - pos();
|
||||
@ -90,11 +85,6 @@ void QgsHighlight::paintLine( QPainter *p, QgsPolyline line )
|
||||
|
||||
for ( int i = 0; i < line.size(); i++ )
|
||||
{
|
||||
if ( mLayer )
|
||||
{
|
||||
line[i] = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, line[i] );
|
||||
}
|
||||
|
||||
polygon[i] = toCanvasCoordinates( line[i] ) - pos();
|
||||
}
|
||||
|
||||
@ -115,11 +105,6 @@ void QgsHighlight::paintPolygon( QPainter *p, QgsPolygon polygon )
|
||||
|
||||
for ( int j = 0; j < polygon[i].size(); j++ )
|
||||
{
|
||||
if ( mLayer )
|
||||
{
|
||||
polygon[i][j] = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, polygon[i][j] );
|
||||
}
|
||||
|
||||
ring[ j ] = toCanvasCoordinates( polygon[i][j] ) - pos();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user