Skip to content

Commit 37cd401

Browse files
committed
[bugfix] Fixes Clip features to canvas extent displayed twice
Fixes #17263
1 parent 711eddc commit 37cd401

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/gui/symbology/qgssymbolslistwidget.cpp

+11-4
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,22 @@ void QgsSymbolsListWidget::updateSymbolInfo()
601601

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

604+
// Remove all previous clip actions
605+
const QList<QAction *> actionList( btnAdvanced->menu()->actions() );
606+
for ( const auto &action : actionList )
607+
{
608+
if ( mClipFeaturesAction->text() == action->text() )
609+
{
610+
btnAdvanced->menu()->removeAction( action );
611+
}
612+
}
613+
604614
if ( mSymbol->type() == QgsSymbol::Line || mSymbol->type() == QgsSymbol::Fill )
605615
{
606616
//add clip features option for line or fill symbols
607617
btnAdvanced->menu()->addAction( mClipFeaturesAction );
608618
}
609-
else
610-
{
611-
btnAdvanced->menu()->removeAction( mClipFeaturesAction );
612-
}
619+
613620
btnAdvanced->setVisible( mAdvancedMenu || !btnAdvanced->menu()->isEmpty() );
614621

615622
mClipFeaturesAction->blockSignals( true );

0 commit comments

Comments
 (0)