Skip to content

Commit

Permalink
make QLR files containing non-vector layers work again
Browse files Browse the repository at this point in the history
This was a regression introduced in ff3200f.
(fixes #14091)
  • Loading branch information
SebDieBln committed Jan 15, 2016
1 parent 4451f29 commit 0ca359e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/qgslayerdefinition.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsvectorlayerjoinbuffer.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 0ca359e

Please sign in to comment.