[QGIS Commit] r13460 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon May 10 09:21:57 EDT 2010


Author: mhugent
Date: 2010-05-10 09:21:54 -0400 (Mon, 10 May 2010)
New Revision: 13460

Modified:
   trunk/qgis/src/app/legend/qgslegendlayer.cpp
Log:
append kml extension automatically for easier interoperability with GE

Modified: trunk/qgis/src/app/legend/qgslegendlayer.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.cpp	2010-05-10 13:01:47 UTC (rev 13459)
+++ trunk/qgis/src/app/legend/qgslegendlayer.cpp	2010-05-10 13:21:54 UTC (rev 13460)
@@ -540,6 +540,15 @@
       QgsVectorFileWriter::deleteShapeFile( vectorFilename );
     }
 
+    //GE does not open files without extensions. Therefore we append it automatically for kml files
+    if ( format == "KML" )
+    {
+      if ( !vectorFilename.endsWith( ".kml", Qt::CaseInsensitive ) )
+      {
+        vectorFilename += ".kml";
+      }
+    }
+
     // ok if the file existed it should be deleted now so we can continue...
     QApplication::setOverrideCursor( Qt::WaitCursor );
 



More information about the QGIS-commit mailing list