Skip to content
Permalink
Browse files

Merge pull request #2620 from SebDieBln/FixCsvSaveStyle

Fix saving style of CSV-layer to qml/sld file (fixes #8285)
  • Loading branch information
jef-n committed Dec 28, 2015
2 parents 416c004 + 02e9272 commit b73785023b408cd5a989c445548e2fa0bb2b9647
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/qgsmaplayer.cpp
@@ -1269,6 +1269,9 @@ QString QgsMapLayer::saveNamedStyle( const QString &theURI, bool &theResultFlag
else if ( vlayer && vlayer->providerType() == "delimitedtext" )
{
filename = QUrl::fromEncoded( theURI.toAscii() ).toLocalFile();
// toLocalFile() returns an empty string if theURI is a plain Windows-path, e.g. "C:/style.qml"
if ( filename.isEmpty() )
filename = theURI;
}
else
{
@@ -1453,6 +1456,9 @@ QString QgsMapLayer::saveSldStyle( const QString &theURI, bool &theResultFlag )
else if ( vlayer->providerType() == "delimitedtext" )
{
filename = QUrl::fromEncoded( theURI.toAscii() ).toLocalFile();
// toLocalFile() returns an empty string if theURI is a plain Windows-path, e.g. "C:/style.qml"
if ( filename.isEmpty() )
filename = theURI;
}
else
{

0 comments on commit b737850

Please sign in to comment.
You can’t perform that action at this time.