Skip to content

Commit

Permalink
Revert "[BUGFIX][QGIS Server] Joins was not reloaded if the layer is …
Browse files Browse the repository at this point in the history
…in cache"

This reverts commit ad32b5e.
  • Loading branch information
rldhont committed Oct 10, 2016
1 parent c2328b1 commit 89dd263
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/server/qgsserverprojectparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include "qgseditorwidgetregistry.h"
#include "qgslayertreegroup.h"

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

#include <QDomDocument>
#include <QFileInfo>
#include <QStringList>
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -1541,7 +1535,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 );
}
Expand Down

0 comments on commit 89dd263

Please sign in to comment.