Feature request #3697

Add option "Zoom to full extent including invisible layers"

Added by Paolo Cavallini about 13 years ago. Updated about 6 years ago.

Status:Open
Priority:Low
Assignee:-
Category:Map Canvas
Pull Request or Patch supplied:Yes Resolution:
Easy fix?:No Copied to github as #:13756

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

Patch_for_the_bug__3697.diff Magnifier (917 Bytes) sunilkcube -, 2011-04-06 03:38 AM

Patch_for_the_bug__3697.2.diff Magnifier (917 Bytes) sunilkcube -, 2011-04-06 03:38 AM

sample_patch.diff Magnifier (2.42 KB) sunilkcube -, 2011-04-07 03:08 AM

fix_zoom_to_full_extent.diff Magnifier - Proposed patch (2.39 KB) Alexander Bruy, 2011-04-16 10:38 AM

History

#1 Updated by sunilkcube - about 13 years ago

  • Status changed from Open to In Progress

#2 Updated by sunilkcube - about 13 years ago

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?.

#3 Updated by Paolo Cavallini about 13 years ago

IMHO yes, also according to the principle of least surprise.

#4 Updated by sunilkcube - about 13 years ago

Replying to [comment:3 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 ?

#5 Updated by Martin Dobias about 13 years ago

Replying to [comment:4 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...

#6 Updated by sunilkcube - about 13 years ago

Replying to [comment:5 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 ...

#7 Updated by Alexander Bruy about 13 years ago

Here is complete patch to fix this issue

#8 Updated by Paolo Cavallini about 13 years ago

Can we include it in 1.7?

#9 Updated by Alexander Bruy about 13 years ago

Replying to [comment:8 pcav]:

Can we include it in 1.7?

I ask Martin to review it. If there is no objections, I'll commit it

#10 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#11 Updated by Paolo Cavallini about 12 years ago

  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Crashes QGIS or corrupts data set to No

#12 Updated by Alexander Bruy almost 12 years ago

  • Pull Request or Patch supplied set to Yes
  • Assignee deleted (sunilkcube -)

#13 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#14 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#15 Updated by Médéric RIBREUX over 8 years ago

  • Status changed from In Progress to Feedback

Hello, bug triage...

in QGIS 2.13 master, when you use "Zoom Full", it still zoom on the activated layers so I think that the path has not been applied.

What do we do with this bug ? With at least 4 years of habit, perhaps users wants to keep the "Zoom Full" like it is now (I'd like it too) ?

#16 Updated by Sebastian Dietrich over 8 years ago

How about two separate options:
  • Zoom Full (visible layers)
  • Zoom Full (loaded layers)

#17 Updated by Médéric RIBREUX over 8 years ago

Sebastian Dietrich wrote:

How about two separate options:
  • Zoom Full (visible layers)
  • Zoom Full (loaded layers)

Hello,

why not, even if there can be a UI problem: there is already 8 buttons for zoom operations. One more button will make the toolbar more encumbered.
Perhaps a new setting in the Settings -> Map Tools tab -> Panning and zooming groupbox which could be named like "Zoom Full behaviour" with a QListWidget with two options "Zoom only on visible layers" and "Zoom on all layers" ?

#18 Updated by Jukka Rahkonen over 8 years ago

I would say this is not a bug because changing the behaviour would make some other users unhappy. It can be a feature request, though. Personally I like the current way better. I wonder which programs belong to the list of "most popular packages".

#19 Updated by Giovanni Manghi over 8 years ago

  • Operating System deleted (All)
  • Category changed from GUI to Map Canvas
  • Status info deleted (0)

Jukka Rahkonen wrote:

I would say this is not a bug because changing the behaviour would make some other users unhappy. It can be a feature request, though. Personally I like the current way better. I wonder which programs belong to the list of "most popular packages".

agree.

#20 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Feedback to Open
  • Tracker changed from Bug report to Feature request
  • Start date set to 2015-12-19

#21 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No

#22 Updated by Paolo Cavallini about 6 years ago

  • Subject changed from Zoom to full extent considers only visible layers to Add option "Zoom to full extent including invisible layers"

Still unimplemented in QGIS3

Also available in: Atom PDF