Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
elpaso and nyalldawson authored May 24, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2e07993 commit dc9864d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
@@ -5731,13 +5731,13 @@ QList< QgsMapLayer * > QgisApp::addSublayers( const QList<QgsProviderSublayerDet
{
if ( QgsLayerTree::isGroup( currentNode ) )
{
group = static_cast<QgsLayerTreeGroup *>( currentNode )->insertGroup( 0, groupName );
group = qobject_cast<QgsLayerTreeGroup *>( currentNode )->insertGroup( 0, groupName );
}
else if ( QgsLayerTree::isLayer( currentNode ) )
{
const auto children { currentNode->parent()->children() };
const QList<QgsLayerTreeNode *> currentNodeSiblings { currentNode->parent()->children() };
int nodeIdx { 0 };
for ( const auto &child : std::as_const( children ) )
for ( const QgsLayerTreeNode* child : std::as_const( currentNodeSiblings ) )
{
nodeIdx++;
if ( child == currentNode )

0 comments on commit dc9864d

Please sign in to comment.