Commit 37cd401 1 parent 711eddc commit 37cd401 Copy full SHA for 37cd401
File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -601,15 +601,22 @@ void QgsSymbolsListWidget::updateSymbolInfo()
601
601
602
602
mOpacityWidget ->setOpacity ( mSymbol ->opacity () );
603
603
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
+
604
614
if ( mSymbol ->type () == QgsSymbol::Line || mSymbol ->type () == QgsSymbol::Fill )
605
615
{
606
616
// add clip features option for line or fill symbols
607
617
btnAdvanced->menu ()->addAction ( mClipFeaturesAction );
608
618
}
609
- else
610
- {
611
- btnAdvanced->menu ()->removeAction ( mClipFeaturesAction );
612
- }
619
+
613
620
btnAdvanced->setVisible ( mAdvancedMenu || !btnAdvanced->menu ()->isEmpty () );
614
621
615
622
mClipFeaturesAction ->blockSignals ( true );
You can’t perform that action at this time.
0 commit comments