mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix replacement in style attribute
This commit is contained in:
parent
66c009fca7
commit
7e274d81ea
@ -426,8 +426,15 @@ void QgsSvgCache::containsElemParams( const QDomElement& elem, bool& hasFillPara
|
|||||||
QStringList::const_iterator entryIt = entryList.constBegin();
|
QStringList::const_iterator entryIt = entryList.constBegin();
|
||||||
for ( ; entryIt != entryList.constEnd(); ++entryIt )
|
for ( ; entryIt != entryList.constEnd(); ++entryIt )
|
||||||
{
|
{
|
||||||
valueSplit = entryIt->split(" ");
|
QStringList keyValueSplit = entryIt->split( ':' );
|
||||||
if( !hasFillParam && entryIt->startsWith( "param(fill)" ) )
|
if ( keyValueSplit.size() < 2 )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QString key = keyValueSplit.at( 0 );
|
||||||
|
QString value = keyValueSplit.at( 1 );
|
||||||
|
valueSplit = value.split( " " );
|
||||||
|
if ( !hasFillParam && value.startsWith( "param(fill)" ) )
|
||||||
{
|
{
|
||||||
hasFillParam = true;
|
hasFillParam = true;
|
||||||
if ( valueSplit.size() > 1 )
|
if ( valueSplit.size() > 1 )
|
||||||
@ -435,7 +442,7 @@ void QgsSvgCache::containsElemParams( const QDomElement& elem, bool& hasFillPara
|
|||||||
defaultFill = QColor( valueSplit.at( 1 ) );
|
defaultFill = QColor( valueSplit.at( 1 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !hasOutlineParam && entryIt->startsWith( "param(outline)" ) )
|
else if ( !hasOutlineParam && value.startsWith( "param(outline)" ) )
|
||||||
{
|
{
|
||||||
hasOutlineParam = true;
|
hasOutlineParam = true;
|
||||||
if ( valueSplit.size() > 1 )
|
if ( valueSplit.size() > 1 )
|
||||||
@ -443,7 +450,7 @@ void QgsSvgCache::containsElemParams( const QDomElement& elem, bool& hasFillPara
|
|||||||
defaultOutline = QColor( valueSplit.at( 1 ) );
|
defaultOutline = QColor( valueSplit.at( 1 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !hasOutlineWidthParam && entryIt->startsWith( "param(outlineWidth)" ) )
|
else if ( !hasOutlineWidthParam && value.startsWith( "param(outlineWidth)" ) )
|
||||||
{
|
{
|
||||||
hasOutlineWidthParam = true;
|
hasOutlineWidthParam = true;
|
||||||
if ( valueSplit.size() > 1 )
|
if ( valueSplit.size() > 1 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user