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 @@ -305,7 +305,7 @@ void QgsComposerLegend::updateLegend()
305
305
306
306
void QgsComposerLegend::updateItem ()
307
307
{
308
- updateFilterByMap ();
308
+ updateFilterByMap ( false );
309
309
QgsComposerItem::updateItem ();
310
310
}
311
311
@@ -604,7 +604,7 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
604
604
{
605
605
// legend is being filtered by map, so we need to re run the hit test too
606
606
// as the style overrides may also have affected the visible symbols
607
- updateFilterByMap ();
607
+ updateFilterByMap ( false );
608
608
}
609
609
else
610
610
{
@@ -618,14 +618,17 @@ void QgsComposerLegend::mapLayerStyleOverridesChanged()
618
618
updateItem ();
619
619
}
620
620
621
- void QgsComposerLegend::updateFilterByMap ()
621
+ void QgsComposerLegend::updateFilterByMap ( bool redraw )
622
622
{
623
623
if ( isRemoved () )
624
624
return ;
625
625
// ask for update
626
626
// the actual update will take place before the redraw.
627
627
// This is to avoid multiple calls to the filter
628
628
mFilterAskedForUpdate = true ;
629
+
630
+ if ( redraw )
631
+ QgsComposerItem::updateItem ();
629
632
}
630
633
631
634
void QgsComposerLegend::doUpdateFilterByMap ()
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
255
255
void invalidateCurrentMap ();
256
256
257
257
private slots:
258
- void updateFilterByMap ();
258
+ void updateFilterByMap ( bool redraw = true );
259
259
260
260
// ! update legend in case style of associated map has changed
261
261
void mapLayerStyleOverridesChanged ();
You can’t perform that action at this time.
0 commit comments