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 1df9d7e.
  • Loading branch information
rldhont committed Oct 10, 2016
1 parent f4cae33 commit 801d4cd
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 "qgslayertreegroup.h"
#include "qgslogger.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 @@ -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 );
}
Expand Down

0 comments on commit 801d4cd

Please sign in to comment.