- 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
This commit is contained in:
g_j_m 2006-09-13 08:32:40 +00:00
parent 2c8c195ce1
commit 5f557ef7d0
2 changed files with 9 additions and 2 deletions

View File

@ -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.

View File

@ -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);
}