[QGIS Commit] r14390 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Oct 17 18:25:27 EDT 2010
Author: timlinux
Date: 2010-10-17 15:25:27 -0700 (Sun, 17 Oct 2010)
New Revision: 14390
Modified:
trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
Fix crash and corruption of project file when saving project with non spatial layers. Fix issue preventing projects with non-spatial layers being loaded.
Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp 2010-10-17 19:28:54 UTC (rev 14389)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp 2010-10-17 22:25:27 UTC (rev 14390)
@@ -2499,9 +2499,12 @@
}
QString errorMsg;
- if ( !readSymbology( layer_node, errorMsg ) )
+ if ( geometryType() != QGis::NoGeometry )
{
- return false;
+ if ( !readSymbology( layer_node, errorMsg ) )
+ {
+ return false;
+ }
}
return mValid; // should be true if read successfully
@@ -2645,11 +2648,13 @@
// renderer specific settings
QString errorMsg;
- if ( !writeSymbology( layer_node, document, errorMsg ) )
+ if ( geometryType() != QGis::NoGeometry )
{
- return false;
+ if ( !writeSymbology( layer_node, document, errorMsg ) )
+ {
+ return false;
+ }
}
-
return true;
} // bool QgsVectorLayer::writeXml
More information about the QGIS-commit
mailing list