Skip to content
Permalink
Browse files

Moved check single value in expressionFromOgcFilter

  • Loading branch information
luipir committed Feb 8, 2017
1 parent 64d1848 commit 2dfb6dcc5d181f21b30ed4eaa90674978427102c
Showing with 10 additions and 8 deletions.
  1. +10 −0 src/core/qgsogcutils.cpp
  2. +0 −8 src/core/symbology-ng/qgssymbollayerutils.cpp
@@ -1603,6 +1603,16 @@ QgsExpression* QgsOgcUtils::expressionFromOgcFilter( const QDomElement& element

QgsExpression *expr = new QgsExpression();

// check if it is a single string value not having DOM elements
// that express OGC operators
if ( element.firstChild().nodeType() == QDomNode::TextNode )
{
expr->setExpression( element.firstChild().nodeValue() );
return expr;
}

// then check OGC DOM elements that contain OGC tags specifying
// OGC operators.
QDomElement childElem = element.firstChildElement();
while ( !childElem.isNull() )
{
@@ -2515,14 +2515,6 @@ bool QgsSymbolLayerUtils::functionFromSldElement( QDomElement &element, QString
return false;
}

// check if it is a single string value
if ( elem.hasChildNodes() &&
elem.firstChild().nodeType() == QDomNode::TextNode )
{
function = elem.firstChild().nodeValue();
return true;
}

// parse ogc:Filter
QgsExpression *expr = QgsOgcUtils::expressionFromOgcFilter( elem );
if ( !expr )

0 comments on commit 2dfb6dc

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