Skip to content

Commit

Permalink
Merge pull request #6162 from elpaso/bugfix-17263-clip-double-show
Browse files Browse the repository at this point in the history
[bugfix] Fixes Clip features to canvas extent displayed twice
  • Loading branch information
elpaso committed Jan 25, 2018
2 parents 30043db + 37cd401 commit 7ee4bb7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/gui/symbology/qgssymbolslistwidget.cpp
Expand Up @@ -601,15 +601,22 @@ void QgsSymbolsListWidget::updateSymbolInfo()

mOpacityWidget->setOpacity( mSymbol->opacity() );

// Remove all previous clip actions
const QList<QAction *> actionList( btnAdvanced->menu()->actions() );
for ( const auto &action : actionList )
{
if ( mClipFeaturesAction->text() == action->text() )
{
btnAdvanced->menu()->removeAction( action );
}
}

if ( mSymbol->type() == QgsSymbol::Line || mSymbol->type() == QgsSymbol::Fill )
{
//add clip features option for line or fill symbols
btnAdvanced->menu()->addAction( mClipFeaturesAction );
}
else
{
btnAdvanced->menu()->removeAction( mClipFeaturesAction );
}

btnAdvanced->setVisible( mAdvancedMenu || !btnAdvanced->menu()->isEmpty() );

mClipFeaturesAction->blockSignals( true );
Expand Down

0 comments on commit 7ee4bb7

Please sign in to comment.