From d6b8c513aba293e70dccf474a77021bf02cda7a4 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sun, 10 Nov 2024 10:53:57 +0700 Subject: [PATCH] Fix typo in the QgsSymbol::exportImage function leading to clipped renders for non-square sizes --- src/core/symbology/qgssymbol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/symbology/qgssymbol.cpp b/src/core/symbology/qgssymbol.cpp index cd5239d537fe..94ba581f5767 100644 --- a/src/core/symbology/qgssymbol.cpp +++ b/src/core/symbology/qgssymbol.cpp @@ -1032,7 +1032,7 @@ void QgsSymbol::exportImage( const QString &path, const QString &format, QSize s QSvgGenerator generator; generator.setFileName( path ); generator.setSize( size ); - generator.setViewBox( QRect( 0, 0, size.height(), size.height() ) ); + generator.setViewBox( QRect( 0, 0, size.width(), size.height() ) ); QPainter painter( &generator ); drawPreviewIcon( &painter, size );