Feature request #3697

Zoom to full extent considers only visible layers

Added by Paolo Cavallini about 6 years ago. Updated 24 days ago.

Status:Open
Priority:Low
Assignee:-
Category:Map Canvas
Pull Request or Patch supplied:Yes Resolution:
Easy fix?: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

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

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

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

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

History

#1 Updated by sunilkcube - about 6 years ago

  • Status changed from Open to In Progress

#2 Updated by sunilkcube - about 6 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 6 years ago

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

#4 Updated by sunilkcube - about 6 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 6 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 6 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 6 years ago

Here is complete patch to fix this issue

#8 Updated by Paolo Cavallini about 6 years ago

Can we include it in 1.7?

#9 Updated by Alexander Bruy about 6 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 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#11 Updated by Paolo Cavallini about 5 years ago

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

#12 Updated by Alexander Bruy about 5 years ago

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

#13 Updated by Paolo Cavallini over 4 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

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

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

#15 Updated by Médéric RIBREUX over 1 year 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 1 year ago

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

#17 Updated by Médéric RIBREUX over 1 year 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 1 year 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 1 year 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 1 year ago

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

#21 Updated by Giovanni Manghi 24 days ago

  • Easy fix? set to No

Also available in: Atom PDF