Opened 13 years ago
Last modified 13 years ago
#3697 assigned bug
Zoom to full extent considers only visible layers
Reported by: | pcav | Owned by: | sunilkcube |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | Version 1.7.0 |
Component: | GUI | Version: | |
Keywords: | zoom, full extent | Cc: | andrea.peri@… |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Zoom to full extent should zoom to the full extent of all loaded layers (as most popular packages do), not only to those activated in the legend
Attachments (4)
Change History (13)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
follow-up: 4 comment:3 by , 13 years ago
IMHO yes, also according to the principle of least surprise.
by , 13 years ago
Attachment: | Patch_for_the_bug_#3697.diff added |
---|
by , 13 years ago
Attachment: | Patch_for_the_bug_#3697.2.diff added |
---|
follow-up: 5 comment:4 by , 13 years ago
Replying to pcav:
Thank you for your opinion.
IMHO yes, also according to the principle of least surprise.
Then I have created a patch for that design. Can you kindly have a look on it and reply me in case of any comments ?
follow-up: 6 comment:5 by , 13 years ago
Replying to sunilkcube:
Then I have created a patch for that design. Can you kindly have a look on it and reply me in case of any comments ?
Using layers from QgsMapLayerRegistry for zoom full functionality may not always work correctly. Not all layers in the registry have to be necessarily connected with the map renderer. There could be other (unrelated) map canvases with their map renderers with different set of layers...
comment:6 by , 13 years ago
Replying to wonder:
Using layers from QgsMapLayerRegistry for zoom full functionality may not always work correctly. Not all layers in the registry have to be necessarily connected with the map renderer. There could be other (unrelated) map canvases with their map renderers with different set of layers...
Thanks for your suggestions ! Can we use the layers directly from the QgsMapCanvas(layers got from the QgsLegend) instead of QgsMapLayerRegistry for calculating full extent. I have attached a sample patch file regarding this, Can you please verify whether this logic is fine ? Waiting for your comments ...
by , 13 years ago
Attachment: | sample_patch.diff added |
---|
comment:7 by , 13 years ago
Keywords: | zoom full extent added |
---|
Here is complete patch to fix this issue
comment:9 by , 13 years ago
Replying to pcav:
Can we include it in 1.7?
I ask Martin to review it. If there is no objections, I'll commit it
The Layers available only in Mapcanvas are used to calculate Full Extent not all the layers present in the Maplayerregistry. Because the design intention of "Zoom Full" may be to show only the visible layers in the Mapcanvas not all the layers. Can anyone please suggest whether we can use "Zoom Full" to show all the visible and invisible layers to calculate the Full extent like other GIS packages?.