Skip to content

Commit 7c54dc0

Browse files
author
homann
committed
Fixes #1186, keeping minimum size of 4
git-svn-id: http://svn.osgeo.org/qgis/trunk@9513 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2dae372 commit 7c54dc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/core/symbology/qgsmarkercatalogue.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ QImage QgsMarkerCatalogue::imageMarker( QString fullName, double size, QPen pen,
100100
//
101101
// First prepare the paintdevice that the marker will be drawn onto
102102
//
103+
104+
// Introduce a minimum size, we don't want it to disappear.
105+
if ( size < 4 )
106+
{
107+
size = 4;
108+
}
109+
103110
QImage myImage;
104111
if ( fullName.left( 5 ) == "hard:" )
105112
{
@@ -109,7 +116,6 @@ QImage QgsMarkerCatalogue::imageMarker( QString fullName, double size, QPen pen,
109116
{
110117
// TODO Change this logic so width is size and height is same
111118
// proportion of scale factor as in oritignal SVG TS XXX
112-
if ( size < 1 ) size = 1;
113119
//QPixmap myPixmap = QPixmap(width,height);
114120
myImage = QImage( size, size, QImage::Format_ARGB32_Premultiplied );
115121
}
@@ -218,7 +224,8 @@ void QgsMarkerCatalogue::hardMarker( QPainter * thepPainter, QString name, doubl
218224
int r = ( s - 2 * lw ) / 2 - 1;
219225
QgsDebugMsg( QString( "Hard marker radius %1" ).arg( r ) );
220226

221-
if ( name == "circle" )
227+
// If radius is 0, draw a circle, so it wont disappear.
228+
if ( name == "circle" || r < 1)
222229
{
223230
// "A stroked ellipse has a size of rectangle.size() plus the pen width."
224231
// (from Qt doc)

0 commit comments

Comments
 (0)