Skip to content

Commit f6d7e25

Browse files
author
jef
committed
apply patch #1447 from smizuno (thanks!)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9908 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent aa076d5 commit f6d7e25

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/app/qgsgraduatedsymboldialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ void QgsGraduatedSymbolDialog::adjustClassification()
332332
pen.setColor( Qt::black );
333333
}
334334

335-
pen.setWidth( 0.1 );
335+
pen.setWidthF( symbol->lineWidth() );
336336
brush.setStyle( Qt::SolidPattern );
337337
symbol->setPen( pen );
338338
symbol->setBrush( brush );

src/app/qgsuniquevaluedialog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ void QgsUniqueValueDialog::setSymbolColor( QgsSymbol *symbol, QColor thecolor )
183183
{
184184
pen.setColor( thecolor );
185185
pen.setStyle( Qt::SolidLine );
186-
pen.setWidthF( 0.1 );
186+
pen.setWidthF( symbol->lineWidth() );
187187
}
188188
else
189189
{
190190
brush.setColor( thecolor );
191191
brush.setStyle( Qt::SolidPattern );
192192
pen.setColor( Qt::black );
193193
pen.setStyle( Qt::SolidLine );
194-
pen.setWidthF( 0.1 );
194+
pen.setWidthF( symbol->lineWidth() );
195195
}
196196
symbol->setPen( pen );
197197
symbol->setBrush( brush );
@@ -247,7 +247,7 @@ void QgsUniqueValueDialog::randomizeColors()
247247
void QgsUniqueValueDialog::resetColors()
248248
{
249249
QColor white;
250-
white.setRgb( 255.0, 255.0, 255.0 );
250+
white.setRgb( 255, 255, 255 );
251251

252252
QList<QListWidgetItem *> selection = mClassListWidget->selectedItems();
253253
if ( selection.size() == 0 )

src/core/renderer/qgssinglesymbolrenderer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ QgsSingleSymbolRenderer::QgsSingleSymbolRenderer( QGis::GeometryType type )
5353
sy->setFillStyle( Qt::SolidPattern );
5454
sy->setColor( QColor( 0, 0, 0 ) );
5555
}
56-
sy->setLineWidth( DEFAULT_LINE_WIDTH ); //declared in qgis.h
5756
mSymbol = sy;
5857
updateSymbolAttributes();
5958
}

src/core/symbology/qgssymbol.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
5050
mRotationClassificationField( -1 ),
5151
mScaleClassificationField( -1 )
5252
{
53-
mPen.setWidth( DEFAULT_LINE_WIDTH );
53+
mPen.setWidthF( DEFAULT_LINE_WIDTH );
5454
}
5555

5656

@@ -70,7 +70,7 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
7070
mRotationClassificationField( -1 ),
7171
mScaleClassificationField( -1 )
7272
{
73-
mPen.setWidth( DEFAULT_LINE_WIDTH );
73+
mPen.setWidthF( DEFAULT_LINE_WIDTH );
7474
}
7575

7676
QgsSymbol::QgsSymbol()
@@ -83,7 +83,7 @@ QgsSymbol::QgsSymbol()
8383
mRotationClassificationField( -1 ),
8484
mScaleClassificationField( -1 )
8585
{
86-
mPen.setWidth( DEFAULT_LINE_WIDTH );
86+
mPen.setWidthF( DEFAULT_LINE_WIDTH );
8787
}
8888

8989

@@ -99,7 +99,7 @@ QgsSymbol::QgsSymbol( QColor c )
9999
mRotationClassificationField( -1 ),
100100
mScaleClassificationField( -1 )
101101
{
102-
mPen.setWidth( DEFAULT_LINE_WIDTH );
102+
mPen.setWidthF( DEFAULT_LINE_WIDTH );
103103
}
104104

105105
QgsSymbol::QgsSymbol( const QgsSymbol& s )
@@ -353,7 +353,7 @@ QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColo
353353
QImage preRotateImage;
354354
QPen pen = mPen;
355355
double newWidth = mPen.widthF() * widthScale * rasterScaleFactor;
356-
pen.setWidth( newWidth );
356+
pen.setWidthF( newWidth );
357357

358358
if ( selected )
359359
{

0 commit comments

Comments
 (0)