diff --git a/src/app/qgsmaptoolrotatelabel.cpp b/src/app/qgsmaptoolrotatelabel.cpp index 2976ae00ce0..d7354f9e1f0 100644 --- a/src/app/qgsmaptoolrotatelabel.cpp +++ b/src/app/qgsmaptoolrotatelabel.cpp @@ -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 ); } diff --git a/src/app/qgspointrotationitem.cpp b/src/app/qgspointrotationitem.cpp index cb7405d1110..5e7897a3c9d 100644 --- a/src/app/qgspointrotationitem.cpp +++ b/src/app/qgspointrotationitem.cpp @@ -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() diff --git a/src/app/qgspointrotationitem.h b/src/app/qgspointrotationitem.h index 37120cfbcc8..148613e3af7 100644 --- a/src/app/qgspointrotationitem.h +++ b/src/app/qgspointrotationitem.h @@ -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