Skip to content
Permalink
Browse files

fix saving style of CSV-layer to qml/sld file (fixes #8285)

  • Loading branch information
SebDieBln committed Dec 28, 2015
1 parent 573a4b7 commit 02e92727d94a11d6c4eeaa1373d5aec01009e5b1
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 02e9272

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