Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topoviewer: use QgsMapCanvasLayer to load layers with visibility=off #15832

Closed
qgib opened this issue Nov 7, 2012 · 4 comments
Closed

topoviewer: use QgsMapCanvasLayer to load layers with visibility=off #15832

qgib opened this issue Nov 7, 2012 · 4 comments
Labels
DB Manager Relating to the DB Manager core plugin Feature Request
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Nov 7, 2012

Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 6655

Redmine category:db_manager
Assignee: Sandro Santilli


When loading big topologies qgis still renders the layers as first thing, before we get a chance of setting visibility off.
This means you can enter the "PAL loop of death" (that is a situation in which labelling kill your CPU).

The PAL issue is not available at the moment (or I can't find it).
But I swear it's there (qgis still hasn't finished loading the project I asked it to open at least 2 minutes before I started writing this ticket)

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2012

Author Name: Giuseppe Sucameli (@brushtyler)


How many layers do you load at the same time?
If more than one, consider to set the render flag to false before loading layers using ```iface.mapCanvas().setRenderFlag(False)

After loading each layer you can set it as invisible using ```iface.legendInterface().setLayerVisible(vl, False)

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2012

Author Name: Sandro Santilli (@strk)


Those calls are already there.

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2012

Author Name: Sandro Santilli (@strk)


Ok one problem was that I did use the setVisibleFlag before adding to legend (for some layers).
This I'm going to fix right now.

But still I'll want to look at NatanW suggestion:
22:41 < NathanW> strk: you wrap it in a QgsMapCanvasLayer and set the visable flag
22:42 < NathanW> QgsMapCanvas take a list of QgsMapCanvasLayer in it's setLayerSet method

PAL is still killing me, but only when I click on the visibility checkbox :/
See #15833 for that one

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2012

Author Name: Sandro Santilli (@strk)


Ok I took a look and setLayerSet seems to be for replacing the whole layer set. Not something I want to do here.
So this is closed.


  • resolution was changed from to fixed
  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib added Feature Request DB Manager Relating to the DB Manager core plugin labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Manager Relating to the DB Manager core plugin Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant