Skip to content

Commit 365dc60

Browse files
author
mhugent
committed
Save/load the option to draw polygon outlines in the continuous color renderer to project file
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5834 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 80f0499 commit 365dc60

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/gui/qgscontinuouscolorrenderer.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ void QgsContinuousColorRenderer::readXML(const QDomNode& rnode, QgsVectorLayer&
179179
QDomNode classnode = rnode.namedItem("classificationfield");
180180
int classificationfield = classnode.toElement().text().toInt();
181181
this->setClassificationField(classificationfield);
182+
183+
//polygon outline
184+
QDomNode polyoutlinenode = rnode.namedItem("polygonoutline");
185+
QString polyoutline = polyoutlinenode.toElement().text();
186+
if(polyoutline == "0")
187+
{
188+
mDrawPolygonOutline = false;
189+
}
190+
else if(polyoutline == "1")
191+
{
192+
mDrawPolygonOutline = true;
193+
}
182194

183195
//read the settings for the renderitem of the minimum value
184196
QDomNode lowernode = rnode.namedItem("lowestsymbol");
@@ -222,6 +234,14 @@ bool QgsContinuousColorRenderer::writeXML( QDomNode & layer_node, QDomDocument &
222234
QDomText classificationfieldtxt=document.createTextNode(QString::number(mClassificationField));
223235
classificationfield.appendChild(classificationfieldtxt);
224236
continuoussymbol.appendChild(classificationfield);
237+
238+
//polygon outlines
239+
QDomElement drawPolygonOutlines = document.createElement("polygonoutline");
240+
int drawPolyInt = mDrawPolygonOutline ? 1 : 0;
241+
QDomText drawPolygonText = document.createTextNode(QString::number(drawPolyInt));
242+
drawPolygonOutlines.appendChild(drawPolygonText);
243+
continuoussymbol.appendChild(drawPolygonOutlines);
244+
225245
QDomElement lowestsymbol=document.createElement("lowestsymbol");
226246
continuoussymbol.appendChild(lowestsymbol);
227247
if(mMinimumSymbol)

0 commit comments

Comments
 (0)