Skip to content
Permalink
Browse files
append kml extension automatically for easier interoperability with GE
git-svn-id: http://svn.osgeo.org/qgis/trunk@13460 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 10, 2010
1 parent 2d9a2b2 commit 499b773f9811497539c8f1b81cefe703bfd65f38
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 499b773

Please sign in to comment.