Skip to content
Permalink
Browse files

[bugfix] Fixes Clip features to canvas extent displayed twice

Fixes #17263
  • Loading branch information
elpaso committed Jan 24, 2018
1 parent 711eddc commit 37cd401e48b38c6d08e630f27d7d9e8486dc63b1
Showing with 11 additions and 4 deletions.
  1. +11 −4 src/gui/symbology/qgssymbolslistwidget.cpp
@@ -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 );

0 comments on commit 37cd401

Please sign in to comment.
You can’t perform that action at this time.