Skip to content

Commit

Permalink
append kml extension automatically for easier interoperability with GE
Browse files Browse the repository at this point in the history
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 78fde29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/legend/qgslegendlayer.cpp
Expand Up @@ -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 );

Expand Down

0 comments on commit 78fde29

Please sign in to comment.