Bug report #8231

Layer is still visible after un-checking (while canvas is rendering)

Added by Donovan Cameron over 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Affected QGIS version:1.8.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:17043

Description

If I uncheck a layer to stop it from being visible while the canvas is rendering, it doesn't actually turn it off.

Zooming, panning or refreshing the canvas with the layer checked off keeps it visible. I would think that panning and zooming would then not draw the layer because it's unchecked in the TOC.

The solution is to check it back on, then uncheck it. Or, just don't uncheck it while the canvas is rendering - wait till rendering is complete or press <esc> then uncheck it.

History

#1 Updated by Matthias Kuhn over 7 years ago

  • Status changed from Open to Feedback

Do you have render caching enabled (In settings => Options => Rendering)?
It is known to cause such effects.

#2 Updated by Donovan Cameron over 7 years ago

Hey Matt.

I checked and don't have render caching enabled on QGIS 1.8.

I'm noticing that if you toggle the visibility for a layer while the canvas is rendering, those changes aren't applied. In fact toggling visibility while the canvas is rendering doesn't affect rendering, the canvas will finish rendering what it was originally trying to render instead of cancelling the current render and restarting.

I have to wait till everything is finished rendering (or press <esc> to cancel rendering), then toggle the visibility.

#3 Updated by Giovanni Manghi over 7 years ago

Donovan Cameron wrote:

Hey Matt.

I checked and don't have render caching enabled on QGIS 1.8.

I'm noticing that if you toggle the visibility for a layer while the canvas is rendering, those changes aren't applied. In fact toggling visibility while the canvas is rendering doesn't affect rendering, the canvas will finish rendering what it was originally trying to render instead of cancelling the current render and restarting.

I have to wait till everything is finished rendering (or press <esc> to cancel rendering), then toggle the visibility.

maybe this is somehow related to the fact that also the "show all layers" and "hide all layers" functions are not working?

#4 Updated by Donovan Cameron over 7 years ago

Giovanni Manghi wrote:

maybe this is somehow related to the fact that also the "show all layers" and "hide all layers" functions are not working?

Looks like that one is actually behaving a little differently.

If you Show All Layers (ctrl+shift+U) or Hide All Layers (ctrl+shift+H) the canvas is not refreshed and the changes aren't shown immediately. But they can be if you manually press Refresh or pan/zoom.

#5 Updated by Donovan Cameron over 7 years ago

#8096 is the bug for that "All Layers" issue =)

#6 Updated by X X almost 7 years ago

I am having the same problem. It occurred in QGIS 1.8 and still seems to exist in 2.0. I think it is related to #8403 (sorry I am new to this and don't know how to link bug reports). It only seems to happen when there are many layers (e.g. more than 40) in a document and doesn't just happen when the canvas is rendering after a pan or zoom. I should note these are all PostGIS layers, but I will try to reproduce the issue with shapefiles.

Our current work-around is to click a layer name to highlight it in the table of contents, wait for QGIS to refresh, and then turn the check-box on or off. If you simply click the check box it will check/uncheck, but the layer won't actually turn off/on in the map canvas. I've been trying to figure out more information on the cause (e.g. enabled and disabled render caching), but haven't had any luck, sorry!

#7 Updated by Giovanni Manghi almost 7 years ago

Brett Z wrote:

I am having the same problem. It occurred in QGIS 1.8 and still seems to exist in 2.0. I think it is related to #8403 (sorry I am new to this and don't know how to link bug reports). It only seems to happen when there are many layers (e.g. more than 40) in a document and doesn't just happen when the canvas is rendering after a pan or zoom. I should note these are all PostGIS layers, but I will try to reproduce the issue with shapefiles.

Our current work-around is to click a layer name to highlight it in the table of contents, wait for QGIS to refresh, and then turn the check-box on or off. If you simply click the check box it will check/uncheck, but the layer won't actually turn off/on in the map canvas. I've been trying to figure out more information on the cause (e.g. enabled and disabled render caching), but haven't had any luck, sorry!

I have just tested on Linux/qgis master, with a huge projects (>100 layers) and cannot replicate the issue.

#8 Updated by X X almost 7 years ago

I tested it some more and found it only occurs when there are PostGIS layer in the document. I tried a project with almost 100 SpatiaLite layers in it and there was no problem; however, as soon as I added one PostGIS layer the problem started occurring (even when turning on or off the SpatiaLite layers). We have 2 PostGIS servers and the problem occurs with layers from either of them. I'm going to try connecting to a clean PostGIS install in a virtual machine on my local computer to see if the problem still occurs...

#9 Updated by Giovanni Manghi almost 7 years ago

Brett Z wrote:

I tested it some more and found it only occurs when there are PostGIS layer in the document. I tried a project with almost 100 SpatiaLite layers in it and there was no problem; however, as soon as I added one PostGIS layer the problem started occurring (even when turning on or off the SpatiaLite layers). We have 2 PostGIS servers and the problem occurs with layers from either of them. I'm going to try connecting to a clean PostGIS install in a virtual machine on my local computer to see if the problem still occurs...

This is weird, because again (by adding postgis layers to my big projects) I can't confirm it (in qgis master).

#10 Updated by X X almost 7 years ago

Thanks Giovanni... I couldn't figure out why you weren't able to replicate the issue, when all 20+ QGIS users here (and may people online line) have it occur - but I think I've isolated it now. The problem only occurs when the "Improved Polygon Capturing´┐╝" plug-in is enabled in the 32-bit version and there are PostGIS layers in the document - a fairly unique situation, which explains why it wasn't occurring for you. We will simply disable this plugin when not being used, and your help troubleshooting is much appreciated. Hopefully this plugin can be fixed by its creator so other users don't have the same issue. Thanks again!

#11 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Also available in: Atom PDF