Bug report #8403

Toggling layer visibility to off doesn't work if you highlight a different layer first

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

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

Description

I noticed that layers don't actually turn off in the map canvas if you try to toggle the visibility to off after highlighting a different layer.

Steps to reproduce:
  1. Highlight target layer and turn it on
  2. Highlight a different layer by left clicking it (layer doesn't have to be turned on, just in the layer list)
  3. Now try to simply click the toggle for visibility to off on the original target layer
    • the layer does not turn off, it still draws on the canvas

This is on:
QGIS 1.8 (from OSGeo4W)
Windows 7

Is this from the same issue as my other bug report #8231?

History

#1 Updated by Larry Shaffer over 6 years ago

Can not reproduce this on Mac 10.7.5 using latest master.

#2 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

I cannot confirm on the latest master on Windows and Linux. Please install qgis master, test and report back.

#3 Updated by Donovan Cameron over 6 years ago

  • Status changed from Feedback to Closed

Same results as the other render bug - could just be a plugin from QGIS 1.8 because problem is not showing up in master or a fresh run of QGIS (renaming users .qgis folder).

#4 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to worksforme

#5 Updated by X X almost 6 years ago

  • Status changed from Closed to Reopened

I am having the same problem. It occurred in QGIS 1.8 and still seems to exist in 2.0. I agree it might be related to #8231. The reason you may not have been able to reproduce it Giovanni is because it only seems to happen when there are many layers (e.g. more than 40) in a document. The problem is actually quite serious for us (all our templates have more than 40 templates), as it has led to people producing maps thinking layers were "turned on" (as the check-box indicated) when in fact they were not.

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!

#6 Updated by Giovanni Manghi almost 6 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 agree it might be related to #8231. The reason you may not have been able to reproduce it Giovanni is because it only seems to happen when there are many layers (e.g. more than 40) in a document.

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

#7 Updated by Giovanni Manghi almost 6 years ago

  • Resolution deleted (worksforme)
  • Status changed from Reopened to Feedback

#8 Updated by Giovanni Manghi almost 6 years ago

  • Affected QGIS version changed from 1.8.0 to 2.0.1
  • Target version set to Future Release - High Priority

#9 Updated by X X almost 6 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. Sorry this is in 2 threads, should I only be updating the #8231 thread?

#10 Updated by Giovanni Manghi almost 6 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. Sorry this is in 2 threads, should I only be updating the #8231 thread?

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

#11 Updated by X X almost 6 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 (I will try contacting them). Thanks again!

#12 Updated by Giovanni Manghi almost 6 years ago

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

Also available in: Atom PDF