Skip to content
Permalink
Browse files

make QLR files containing non-vector layers work again

This was a regression introduced in ff3200f.
(fixes #14091)
  • Loading branch information
SebDieBln committed Jan 15, 2016
1 parent 4451f29 commit 0ca359e4e53127d897096270e069e2c69ff9f256
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/core/qgslayerdefinition.cpp
  2. +1 −1 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
@@ -131,7 +131,7 @@ bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGrou
// Now that all layers are loaded, refresh the vectorjoins to get the joined fields
Q_FOREACH ( QgsMapLayer* layer, layers )
{
QgsVectorLayer* vlayer = static_cast< QgsVectorLayer * >( layer );
QgsVectorLayer* vlayer = dynamic_cast< QgsVectorLayer * >( layer );
if ( vlayer )
{
vlayer->createJoinCaches();
@@ -384,7 +384,7 @@ void TestVectorLayerJoinBuffer::testJoinLayerDefinitionFile()
QList<QgsMapLayer*> mapLayers = QgsMapLayerRegistry::instance()->mapLayersByName( "layerB" );
QCOMPARE( mapLayers.count(), 1 );

QgsVectorLayer* vLayer = static_cast<QgsVectorLayer*>( mapLayers.value( 0 ) );
QgsVectorLayer* vLayer = dynamic_cast<QgsVectorLayer*>( mapLayers.value( 0 ) );
QVERIFY( vLayer );

// Check for vector join

0 comments on commit 0ca359e

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