Skip to content
Permalink
Browse files

remove 'layercount' attribute from project file

The 'layercount' attribute was not used anyway and the calculated number could already be outdated when loading the project file again due to changes to embedded projects.
  • Loading branch information
SebDieBln committed Dec 27, 2015
1 parent 95a56b9 commit d26bd46d99417fbe246cd515e55bdb27a881c27a
@@ -45,7 +45,7 @@
</filegroup>
</legendlayer>
</legend>
<projectlayers layercount="4">
<projectlayers>
<maplayer minimumScale="0" maximumScale="1e+08" geometry="Line" type="vector" hasScaleBasedVisibilityFlag="0">
<id>lines20130323011923044</id>
<datasource>./lines.shp</datasource>
@@ -1058,7 +1058,6 @@ bool QgsProject::write()
// Iterate over layers in zOrder
// Call writeXML() on each
QDomElement projectLayersNode = doc->createElement( "projectlayers" );
projectLayersNode.setAttribute( "layercount", qulonglong( layers.size() ) );

QMap<QString, QgsMapLayer*>::ConstIterator li = layers.constBegin();
while ( li != layers.end() )
@@ -42,7 +42,7 @@
</filegroup>
</legendlayer>
</legend>
<projectlayers layercount="3">
<projectlayers>
<maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<id>aoi20130902095858570</id>
<datasource>dbname='./pal_features_v3.sqlite' table="aoi" (geometry) sql=</datasource>
@@ -37,7 +37,7 @@
</filegroup>
</legendlayer>
</legend>
<projectlayers layercount="2">
<projectlayers>
<maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<id>aoi20130902095858570</id>
<datasource>dbname='./features_v3.sqlite' table="aoi" (geometry) sql=</datasource>
@@ -47,7 +47,7 @@
</filegroup>
</legendlayer>
</legend>
<projectlayers layercount="1">
<projectlayers>
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<id>testlayer20150528120452665</id>
<datasource>./testlayer.shp</datasource>
@@ -72,7 +72,7 @@
<layer_coordinate_transform destAuthId="EPSG:4326" srcAuthId="EPSG:4326" srcDatumTransform="-1" destDatumTransform="-1" layerid="testlayer20150528120452665"/>
</layer_coordinate_transform_info>
</mapcanvas>
<projectlayers layercount="1">
<projectlayers>
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<id>testlayer20150528120452665</id>
<datasource>./testlayer.shp</datasource>
@@ -375,7 +375,7 @@
</ComposerLabel>
</Composition>
</Composer>
<projectlayers layercount="5">
<projectlayers>
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="1" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<id>Hello_copy20150804164427541</id>
<datasource>dbname='./helloworld.db' table="hello" (geom) sql=</datasource>

0 comments on commit d26bd46

Please sign in to comment.
You can’t perform that action at this time.