Skip to content
Permalink
Browse files

Fix bad icon drawn on top of points when rotating labels

  • Loading branch information
nyalldawson committed Sep 4, 2017
1 parent 0f407e1 commit d1d5e6cf83d4b2e898bf7385181febfc9e7ec6d1
Showing with 4 additions and 9 deletions.
  1. +0 −1 src/app/qgsmaptoolrotatelabel.cpp
  2. +3 −7 src/app/qgspointrotationitem.cpp
  3. +1 −1 src/app/qgspointrotationitem.h
@@ -92,7 +92,6 @@ void QgsMapToolRotateLabel::canvasPressEvent( QgsMapMouseEvent *e )

mRotationItem = new QgsPointRotationItem( mCanvas );
mRotationItem->setOrientation( QgsPointRotationItem::Clockwise );
mRotationItem->setSymbol( QgsApplication::getThemePixmap( QStringLiteral( "mActionRotatePointSymbols.svg" ) ).toImage() );
mRotationItem->setPointLocation( mRotationPoint );
mRotationItem->setSymbolRotation( mCurrentRotation );
}
@@ -25,14 +25,10 @@ QgsPointRotationItem::QgsPointRotationItem( QgsMapCanvas *canvas )
//setup font
mFont.setPointSize( 12 );
mFont.setBold( true );
}

QgsPointRotationItem::QgsPointRotationItem()
: QgsMapCanvasItem( nullptr )
, mOrientation( Clockwise )
, mRotation( 0.0 )
{

QImage im( 24, 24, QImage::Format_ARGB32 );
im.fill( Qt::transparent );
setSymbol( im );
}

QgsPointRotationItem::~QgsPointRotationItem()
@@ -51,7 +51,7 @@ class APP_EXPORT QgsPointRotationItem: public QgsMapCanvasItem
Orientation orientation() const { return mOrientation; }

private:
QgsPointRotationItem();

//! Converts rotation into QPainter rotation considering mOrientation
int painterRotation( int rotation ) const;
//! Clockwise (default) or counterclockwise

0 comments on commit d1d5e6c

Please sign in to comment.
You can’t perform that action at this time.