22 #ifdef HAVE_SERVER_PYTHON_PLUGINS
27 #ifdef HAVE_SERVER_PYTHON_PLUGINS
29 QHash<QgsMapLayer *, QString> &originalLayerFilters )
31 if (
QgsVectorLayer *layer = qobject_cast<QgsVectorLayer *>( mapLayer ) )
36 if ( !originalLayerFilters.contains( layer ) )
38 originalLayerFilters.insert( layer, layer->subsetString() );
40 if ( !layer->subsetString().isEmpty() )
42 sql.prepend(
") AND (" );
44 sql.prepend( layer->subsetString() );
47 if ( !layer->setSubsetString( sql ) )
57 if (
QgsVectorLayer *layer = qobject_cast<QgsVectorLayer *>( mapLayer ) )
62 if ( !layer->subsetString().isEmpty() )
64 sql.prepend(
") AND (" );
66 sql.prepend( layer->subsetString() );
69 if ( !layer->setSubsetString( sql ) )
81 QHash<QgsMapLayer *, QString>::const_iterator filterIt = filterMap.constBegin();
82 for ( ; filterIt != filterMap.constEnd(); ++filterIt )
84 QgsVectorLayer *filteredLayer = qobject_cast<QgsVectorLayer *>( filterIt.key() );