Skip to content

Commit

Permalink
Updated indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 23, 2014
1 parent 189707f commit 45d0a9c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions src/app/legend/qgsapplegendinterface.cpp
Expand Up @@ -302,26 +302,26 @@ void QgsAppLegendInterface::onRemovedChildren()
void QgsAppLegendInterface::addLegendLayerAction( QAction* action,
QString menu, QString id, QgsMapLayer::LayerType type, bool allLayers )
{
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>(mLayerTreeView->menuProvider());
if (!menuProvider)
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>( mLayerTreeView->menuProvider() );
if ( !menuProvider )
return;

menuProvider->addLegendLayerAction( action, menu, id, type, allLayers );
}

void QgsAppLegendInterface::addLegendLayerActionForLayer( QAction* action, QgsMapLayer* layer )
{
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>(mLayerTreeView->menuProvider());
if (!menuProvider)
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>( mLayerTreeView->menuProvider() );
if ( !menuProvider )
return;

menuProvider->addLegendLayerActionForLayer( action, layer );
}

bool QgsAppLegendInterface::removeLegendLayerAction( QAction* action )
{
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>(mLayerTreeView->menuProvider());
if (!menuProvider)
QgsAppLayerTreeViewMenuProvider* menuProvider = dynamic_cast<QgsAppLayerTreeViewMenuProvider*>( mLayerTreeView->menuProvider() );
if ( !menuProvider )
return false;

menuProvider->removeLegendLayerAction( action );
Expand Down
24 changes: 12 additions & 12 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -238,7 +238,7 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()


void QgsAppLayerTreeViewMenuProvider::addLegendLayerAction( QAction* action, QString menu, QString id,
QgsMapLayer::LayerType type, bool allLayers )
QgsMapLayer::LayerType type, bool allLayers )
{
mLegendLayerActionMap[type].append( LegendLayerAction( action, menu, id, allLayers ) );
}
Expand Down Expand Up @@ -271,11 +271,11 @@ void QgsAppLayerTreeViewMenuProvider::addLegendLayerActionForLayer( QAction* act
= mLegendLayerActionMap.find( layer->type() );
for ( int i = 0; i < it->count(); i++ )
{
if ( ( *it )[i].action == action )
{
( *it )[i].layers.append( layer );
return;
}
if (( *it )[i].action == action )
{
( *it )[i].layers.append( layer );
return;
}
}
}

Expand All @@ -288,7 +288,7 @@ void QgsAppLayerTreeViewMenuProvider::removeLegendLayerActionsForLayer( QgsMapLa
= mLegendLayerActionMap.find( layer->type() );
for ( int i = 0; i < it->count(); i++ )
{
( *it )[i].layers.removeAll( layer );
( *it )[i].layers.removeAll( layer );
}
}

Expand All @@ -297,12 +297,12 @@ QList< LegendLayerAction > QgsAppLayerTreeViewMenuProvider::legendLayerActions(
#ifdef QGISDEBUG
if ( mLegendLayerActionMap.contains( type ) )
{
QgsDebugMsg( QString("legendLayerActions for layers of type %1:").arg( type ) );
QgsDebugMsg( QString( "legendLayerActions for layers of type %1:" ).arg( type ) );

foreach ( LegendLayerAction lyrAction, mLegendLayerActionMap[ type ] )
{
QgsDebugMsg( QString("%1/%2 - %3 layers").arg( lyrAction.menu ).arg( lyrAction.action->text() ).arg( lyrAction.layers.count()) );
}
foreach ( LegendLayerAction lyrAction, mLegendLayerActionMap[ type ] )
{
QgsDebugMsg( QString( "%1/%2 - %3 layers" ).arg( lyrAction.menu ).arg( lyrAction.action->text() ).arg( lyrAction.layers.count() ) );
}
}
#endif

Expand Down

0 comments on commit 45d0a9c

Please sign in to comment.