File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ void QgsComposerLegend::updateLegend()
305305
306306void QgsComposerLegend::updateItem ()
307307{
308- updateFilterByMap ();
308+ updateFilterByMap ( false );
309309 QgsComposerItem::updateItem ();
310310}
311311
@@ -604,7 +604,7 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
604604 {
605605 // legend is being filtered by map, so we need to re run the hit test too
606606 // as the style overrides may also have affected the visible symbols
607- updateFilterByMap ();
607+ updateFilterByMap ( false );
608608 }
609609 else
610610 {
@@ -618,14 +618,17 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
618618 updateItem ();
619619}
620620
621- void QgsComposerLegend::updateFilterByMap ()
621+ void QgsComposerLegend::updateFilterByMap ( bool redraw )
622622{
623623 if ( isRemoved () )
624624 return ;
625625 // ask for update
626626 // the actual update will take place before the redraw.
627627 // This is to avoid multiple calls to the filter
628628 mFilterAskedForUpdate = true ;
629+
630+ if ( redraw )
631+ QgsComposerItem::updateItem ();
629632}
630633
631634void QgsComposerLegend::doUpdateFilterByMap ()
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
255255 void invalidateCurrentMap ();
256256
257257 private slots:
258- void updateFilterByMap ();
258+ void updateFilterByMap ( bool redraw = true );
259259
260260 // ! update legend in case style of associated map has changed
261261 void mapLayerStyleOverridesChanged ();
You can’t perform that action at this time.
0 commit comments