Skip to content
Permalink
Browse files
- Fix the bug where setting the outline thickness of polygons
  didn't work with a continuous renderer.
- Only show the 'draw polygon outline' check box when the layer
  type is polygon
- Allow a outline thickness of 0 (gives a 1 pixel line)


git-svn-id: http://svn.osgeo.org/qgis/trunk@5824 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 13, 2006
1 parent 2c8c195 commit 5f557ef7d0ae6560deec05648fea27472f3c5786
Showing with 9 additions and 2 deletions.
  1. +3 −1 src/gui/qgscontinuouscolordialog.cpp
  2. +6 −1 src/gui/qgscontinuouscolorrenderer.cpp
@@ -84,7 +84,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog(QgsVectorLayer * layer)
lblMinValue->setPaletteBackgroundColor(minsymbol->brush().color());
lblMaxValue->setPaletteBackgroundColor(maxsymbol->brush().color());
}
outlinewidthspinbox->setMinValue(1);
outlinewidthspinbox->setMinValue(0);
outlinewidthspinbox->setValue(minsymbol->pen().width());

if (renderer->drawPolygonOutline())
@@ -96,6 +96,8 @@ QgsContinuousColorDialog::QgsContinuousColorDialog(QgsVectorLayer * layer)
{
cb_polygonOutline->setCheckState(Qt::Checked);
outlinewidthspinbox->setValue(1);
if (mVectorLayer->vectorType() != QGis::Polygon)
cb_polygonOutline->setVisible(false);
}
// Ensure that the state of other widgets is appropriate for the
// state of the polygonoutline checkbox.
@@ -152,7 +152,12 @@ void QgsContinuousColorRenderer::renderFeature(QPainter * p, QgsFeature * f, QPi
{
p->setBrush(QColor(red, green, blue));
if (mDrawPolygonOutline)
p->setPen(QColor(0, 0, 0));
{
QPen pen;
pen.setColor(QColor(0,0,0));
pen.setWidthF(widthScale*mMinimumSymbol->pen().width());
p->setPen(pen);
}
else
p->setPen(Qt::NoPen);
}

0 comments on commit 5f557ef

Please sign in to comment.