Skip to content

Commit fda285a

Browse files
author
timlinux
committedNov 26, 2008

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed
 

‎src/app/qgscontinuouscolordialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "qgscontinuouscolordialog.h"
2121
#include "qgscontinuouscolorrenderer.h"
22+
#include "qgis.h"
2223
#include "qgsfield.h"
2324
#include "qgssymbol.h"
2425
#include "qgsvectordataprovider.h"
@@ -122,7 +123,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
122123
else
123124
{
124125
cb_polygonOutline->setCheckState( Qt::Checked );
125-
outlinewidthspinbox->setValue( 0.4 );
126+
outlinewidthspinbox->setValue( DEFAULT_LINE_WIDTH );
126127
if ( mVectorLayer->geometryType() != QGis::Polygon )
127128
cb_polygonOutline->setVisible( false );
128129

‎src/core/qgis.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const int USER_CRS_START_ID = 100000;
151151
const double MINIMUM_POINT_SIZE = 0.1;
152152
/** Magic number that determines the default point size for point symbols */
153153
const double DEFAULT_POINT_SIZE = 2.0;
154+
const double DEFAULT_LINE_WIDTH = 0.2;
154155

155156
// FIXME: also in qgisinterface.h
156157
#ifndef QGISEXTERN

‎src/core/renderer/qgssinglesymbolrenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ QgsSingleSymbolRenderer::QgsSingleSymbolRenderer( QGis::GeometryType type )
5353
sy->setFillStyle( Qt::SolidPattern );
5454
sy->setColor( QColor( 0, 0, 0 ) );
5555
}
56-
sy->setLineWidth( 0.2 );
56+
sy->setLineWidth( DEFAULT_LINE_WIDTH ); //declared in qgis.h
5757
mSymbol = sy;
5858
updateSymbolAttributes();
5959
}

‎src/core/symbology/qgssymbol.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* $Id$ */
1919
#include <cmath>
2020

21+
#include "qgis.h"
2122
#include "qgssymbol.h"
2223
#include "qgslogger.h"
2324
#include "qgssymbologyutils.h"
@@ -47,7 +48,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
4748
mCacheUpToDate2( false ),
4849
mRotationClassificationField( -1 ),
4950
mScaleClassificationField( -1 )
50-
{}
51+
{
52+
mPen.setWidth( DEFAULT_LINE_WIDTH );
53+
}
5154

5255

5356
QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QString label, QColor c ) :
@@ -65,7 +68,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
6568
mCacheUpToDate2( false ),
6669
mRotationClassificationField( -1 ),
6770
mScaleClassificationField( -1 )
68-
{}
71+
{
72+
mPen.setWidth( DEFAULT_LINE_WIDTH );
73+
}
6974

7075
QgsSymbol::QgsSymbol()
7176
: mPointSymbolName( "hard:circle" ),
@@ -76,7 +81,9 @@ QgsSymbol::QgsSymbol()
7681
mCacheUpToDate2( false ),
7782
mRotationClassificationField( -1 ),
7883
mScaleClassificationField( -1 )
79-
{}
84+
{
85+
mPen.setWidth( DEFAULT_LINE_WIDTH );
86+
}
8087

8188

8289
QgsSymbol::QgsSymbol( QColor c )
@@ -90,7 +97,9 @@ QgsSymbol::QgsSymbol( QColor c )
9097
mCacheUpToDate2( false ),
9198
mRotationClassificationField( -1 ),
9299
mScaleClassificationField( -1 )
93-
{}
100+
{
101+
mPen.setWidth( DEFAULT_LINE_WIDTH );
102+
}
94103

95104
QgsSymbol::QgsSymbol( const QgsSymbol& s )
96105
{

0 commit comments

Comments
 (0)
Please sign in to comment.