Skip to content

Commit 78fde29

Browse files
author
mhugent
committed
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
1 parent 495286a commit 78fde29

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/legend/qgslegendlayer.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,15 @@ void QgsLegendLayer::saveAsVectorFileGeneral( bool saveOnlySelection )
540540
QgsVectorFileWriter::deleteShapeFile( vectorFilename );
541541
}
542542

543+
//GE does not open files without extensions. Therefore we append it automatically for kml files
544+
if ( format == "KML" )
545+
{
546+
if ( !vectorFilename.endsWith( ".kml", Qt::CaseInsensitive ) )
547+
{
548+
vectorFilename += ".kml";
549+
}
550+
}
551+
543552
// ok if the file existed it should be deleted now so we can continue...
544553
QApplication::setOverrideCursor( Qt::WaitCursor );
545554

0 commit comments

Comments
 (0)