Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[bugfix] Fixes Clip features to canvas extent displayed twice
Fixes #17263
  • Loading branch information
elpaso committed Jan 24, 2018
1 parent 711eddc commit 37cd401
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 37cd401

Please sign in to comment.