Bug report #14756

FeatureCount in Layer Panel not updated (Timemanager plugin)

Added by Richard Duivenvoorde over 3 years ago. Updated 8 months ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Legend
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:22713

Description

See this mailing thread:

https://lists.osgeo.org/pipermail/qgis-developer/2016-May/042542.html

Not sure if this is a plugin issue, not calling the right signals, or if it is a QGIS issue, the layer panel not listening to the right signals

To test:

- unzip data1.zip
- load the gml in QGIS (epsg 4326)
- via context menu in layermanager add 'show feature count), showing ALL features now
- start time manager
- go to time manager settings, and add layer
- starttime = 'time' column no endtime
- set timeframe size to 60 minutes
- now the featurecount should be 1273
- now instead of the 'play' button, use the little step button all to the right of the slider
- you see the dots changing, but not unless you hover over the layermanager it will change to 1244 (or so)

( created an issue in the plugin issues pointing to this one: https://github.com/anitagraser/TimeManager/issues/163 )

data1.zip - example gml + gfs (281 KB) Richard Duivenvoorde, 2016-05-02 01:29 PM

History

#1 Updated by Richard Duivenvoorde over 3 years ago

Trying to debug this and see if I can find some signal to emit.

When hovering over the 'Layers Panel' immidiatly the count is set to the right value, but ONLY when you hover the Layers Panel.

That made me think there was some repaint issue, so tried:
iface.layerTreeView().repaint()
but nothing changed

Then I found
iface.layerTreeView().reset()
and THAT actually updates the count too...
BUT: is probably too much:
http://doc.qt.io/qt-4.8/qabstractitemview.html#reset
it also closes opened groups etc etc

anyway, it looks like if the 'model' below the 'view' is updated ok, but the repaint of the layernode in the view is not triggered (other then when moving the mouse in the Layers Panel)

#2 Updated by Richard Duivenvoorde over 3 years ago

  • Subject changed from Timemanager plugin + show feature count to FeatureCount in Layer Panel not updated (Timemanager plugin)

#3 Updated by Richard Duivenvoorde over 3 years ago

  • Target version set to Version 2.16
  • Category changed from GUI to Map Legend

#4 Updated by Giovanni Manghi over 2 years ago

  • Easy fix? set to No
  • Regression? set to No

#5 Updated by Giovanni Manghi 8 months ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF