When programmatically applying a subset string to a vector layer (here:
ax_flurstueck with object count 34265)
l = iface.activeLayer() l.setSubsetString('gemarkungsnummer in ('2760','2765','2771','2780','2786','2800','2811','2817','2836')')
the map canvas refreshes automatically, but not the object count in the layer tree (displays still 34265 objects):
When moving the main window around or changing the width of the layer tree or something like that, the layer tree refreshes (21581 objects).
The question is, how to achieve this programmatically? I did not find something like:
in analogy to refreshing the map canvas. Am I missing something?