Bug report #20462

Periodically refreshing the rendering of a layer doesn't work

Added by c m almost 6 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:3.4.0 Regression?:Yes
Operating System:windows 7 Professional Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28282

Description

I added a vector layer > Protocol > URI= url of a web api that returns a geojson feed.

Displayed OK (inside QGIS Desktop 3.4)

If I go into layers's properties > Rendering > checkbox "Refresh layer every (seconds)" > checked & added a value (60 for instance)
But my layer's data never gets updated after that

Though refreshing (of the layer's data source + rendering) works if I click on the refresh button (F5) inside QGIS Desktop

History

#1 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Open to Feedback

Does it happens only with that specific type of datasource?

#2 Updated by c m almost 6 years ago

I tried with other vector layer's sources, i.e data coming from MSSQLServer or a postGIS db.
And the same thing happens : no (visible) refresh.

#3 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Feedback to Open
  • Priority changed from Normal to High
  • Regression? changed from No to Yes

#4 Updated by Paul Blottiere over 5 years ago

  • Status changed from Open to Feedback

Hi @c m,

I tried the "Refresh layer every (seconds)" option on master and 3.4 release (with SHP and Postgis layer), and everything seems to be fine.

Can you check the "Map canvas refresh" option in Settings -> Options... -> Rendering -> Debugging.

This way, you should have some prints in the rendering log for each refresh:

2019-02-15T11:05:37 WARNING 1 ms: array_tbl_a9a0662f_ecbc_4b7d_94a1_ae23900890ed
2019-02-15T11:05:37 WARNING 1 ms: Labeling
2019-02-15T11:05:37 WARNING ---
2019-02-15T11:05:37 WARNING 5 ms: array_tbl_a9a0662f_ecbc_4b7d_94a1_ae23900890ed
2019-02-15T11:05:37 WARNING 1 ms: Labeling
2019-02-15T11:05:37 WARNING ---
2019-02-15T11:05:37 WARNING Canvas refresh: 12 ms

#5 Updated by c m over 5 years ago

Ok
thanks for checking !

might be related with something else, like checkbox/textbox's values may not be saved/applied on the first time, but ok when re-opening the project.

#6 Updated by c m over 5 years ago

I checked the "Map canvas refresh" option in Settings -> Options... -> Rendering -> Debugging.
And everything seems ok to me in the rendering log

#7 Updated by Paul Blottiere over 5 years ago

And everything seems ok to me in the rendering log

So if "Refresh layer every (seconds)" is set with 1 second, do you observe a new message in the rendering log every second?

#8 Updated by c m over 5 years ago

Yes I do.

But in case of

- a layer coming from a db, shp, ... : I see the canvas blink and the data get updated => OK.

- a layer linked with a http feed (add vector > protocol > geojson) supplying a geojson feed (web api) : the layer doesn't get updated. I don't see the canvas blink, nothing changed. Though there's some message in the rendering log, and the refresh works if I click on the refresh button (F5).

#9 Updated by Giovanni Manghi over 5 years ago

- a layer linked with a http feed (add vector > protocol > geojson) supplying a geojson feed (web api) : the layer doesn't get updated. I don't see the canvas blink, nothing changed. Though there's some message in the rendering log, and the refresh works if I click on the refresh button (F5).

this seems duplicate of #20925

#10 Updated by c m over 5 years ago

I wouldn't say that,
because here (#20462) : "the refresh works if I click on the refresh button (F5)"
though with #20925 : "Cant be refreshed - need to close QGIS and reopen to see updates. F5 key does not refresh"

#11 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open

because here (#20462) : "the refresh works if I click on the refresh button (F5)"

was this really working as expected on 2.*?

Also available in: Atom PDF