Skip to content
Permalink
Browse files
append kml extension automatically for easier interoperability with GE
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13460 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 10, 2010
1 parent 495286a commit 78fde29aade0c13f43bd4539b1dc891389b351e3
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/app/legend/qgslegendlayer.cpp
@@ -540,6 +540,15 @@ void QgsLegendLayer::saveAsVectorFileGeneral( bool saveOnlySelection )
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 );

0 comments on commit 78fde29

Please sign in to comment.