mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-25 00:05:03 -04:00
Moved check single value in expressionFromOgcFilter
This commit is contained in:
parent
64d18482c8
commit
2dfb6dcc5d
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user