Skip to content
Permalink
Browse files

Revert "[BUGFIX][QGIS Server] Joins was not reloaded if the layer is …

…in cache"

This reverts commit 1df9d7e.
  • Loading branch information
rldhont committed Oct 10, 2016
1 parent f4cae33 commit 801d4cd9cd61438aea74bfa6cabc891afdca9159
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/server/qgsserverprojectparser.cpp
@@ -28,9 +28,6 @@
#include "qgslayertreegroup.h"
#include "qgslogger.h"

#include "qgslogger.h"
#include "qgsmessagelog.h"

#include <QDomDocument>
#include <QFileInfo>
#include <QStringList>
@@ -237,11 +234,8 @@ QgsMapLayer* QgsServerProjectParser::createLayerFromElement( const QDomElement&
if ( !QgsMapLayerRegistry::instance()->mapLayer( id ) )
QgsMapLayerRegistry::instance()->addMapLayer( layer, false, false );
if ( layer->type() == QgsMapLayer::VectorLayer )
{
addValueRelationLayersForLayer( dynamic_cast<QgsVectorLayer *>( layer ) );
// Reload joins and expression fields
layer->readLayerXML( const_cast<QDomElement&>( elem ) );
}

return layer;
}

@@ -1547,7 +1541,7 @@ void QgsServerProjectParser::addJoinLayersForElement( const QDomElement& layerEl
{
QString id = joinNodeList.at( i ).toElement().attribute( "joinLayerId" );
QgsMapLayer* layer = mapLayerFromLayerId( id );
if ( layer && !QgsMapLayerRegistry::instance()->mapLayer( id ))
if ( layer )
{
QgsMapLayerRegistry::instance()->addMapLayer( layer, false, false );
}

0 comments on commit 801d4cd

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