File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ void QgsComposerLegend::updateLegend()
306306
307307void QgsComposerLegend::updateItem ()
308308{
309- updateFilterByMap ();
309+ updateFilterByMap ( false );
310310 QgsComposerItem::updateItem ();
311311}
312312
@@ -605,7 +605,7 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
605605 {
606606 // legend is being filtered by map, so we need to re run the hit test too
607607 // as the style overrides may also have affected the visible symbols
608- updateFilterByMap ();
608+ updateFilterByMap ( false );
609609 }
610610 else
611611 {
@@ -619,14 +619,17 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
619619 updateItem ();
620620}
621621
622- void QgsComposerLegend::updateFilterByMap ()
622+ void QgsComposerLegend::updateFilterByMap ( bool redraw )
623623{
624624 if ( isRemoved () )
625625 return ;
626626 // ask for update
627627 // the actual update will take place before the redraw.
628628 // This is to avoid multiple calls to the filter
629629 mFilterAskedForUpdate = true ;
630+
631+ if ( redraw )
632+ QgsComposerItem::updateItem ();
630633}
631634
632635void 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