qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.6k stars 3.01k forks source link

Opening .qgs project file from right-click does not open to last saved extent. #45809

Open dmede opened 3 years ago

dmede commented 3 years ago

What is the bug or the crash?

When using right-click to open a QGIS project file (.qgs) the project will not open to the last saved extent. Instead the project map will always be centered at 0,0 and about 1:560000. If opening the project file using the Open Project menu or drag and drop method the last saved extent will open. Note: QGIS MUST NOT already be open while using the R click method. If using R click with QGIS open the last saved extent will open.

Steps to reproduce the issue

  1. Create a new QGIS project with global data layer (e.g. Natural Earth Admin_0)
  2. Set the map view to a specific scale and extent and save the project.
  3. Close QGIS (close all instances of QGIS).
  4. Navigate to saved .qgs file and right-click to open in QGIS.

Versions

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.16.11-Hannover | QGIS code revision | 26cc1c762f -- | -- | -- | -- Compiled against Qt | 5.14.2 | Running against Qt | 5.14.2 Compiled against GDAL/OGR | 3.2.1 | Running against GDAL/OGR | 3.2.1 Compiled against GEOS | 3.9.1-CAPI-1.14.2 | Running against GEOS | 3.9.1-CAPI-1.14.2 Compiled against SQLite | 3.31.1 | Running against SQLite | 3.31.1 PostgreSQL Client Version | 12.3 | SpatiaLite Version | 4.3.0a QWT Version | 6.1.4 | QScintilla2 Version | 2.11.4 Compiled against PROJ | 6.3.2 | Running against PROJ | Rel. 6.3.2, May 1st, 2020 OS Version | macOS Mojave (10.14) Active python plugins | QuickOSM; quick_map_services; qconsolidate3; Multi_Ring_Buffer; LAStools; rvt-qgis; OSMDownloader; openlayers_plugin; GroupStats; LocatePoints; processing; db_manager; MetaSearch

Supported QGIS version

New profile

Additional context

Running 3.16 LTR on a MacBook Pro 10.14.6. The only data layer being used is a standard country polygon layer from Esri in EPSG 4326

gioman commented 3 years ago
  • Create a new QGIS project with global data layer (e.g. Natural Earth Admin_0)

  • Set the map view to a specific scale and extent and save the project.

  • Close QGIS (close all instances of QGIS).

  • Navigate to saved .qgs file and right-click to open in QGIS.

@dmede cannot replicate here, 3.16.12 on Windows.

antoniolocandro commented 3 years ago

I think this is specific to MacOS, so someone with that OS needs to try it also

gioman commented 3 years ago

MacOS

@antoniolocandro I will try on Catalina (my mac mini can't be upgraded to BigSur or Monterey).

dmede commented 3 years ago

Did a clean re-install of LTR 3.16 to clear any preference files that may be affecting my installation. Repeated the right click to open steps, still finding the file opens zoomed in on 0,0.

gioman commented 3 years ago

As a matter of fact I confirm on macOS.

vlebert commented 2 years ago

Hi I have the same bug on MAC M1 PRO 3.22.8-Białowieża

Any news?

smnorris commented 1 year ago

Similar behaviour on macOS 13.4 / QGIS 3.30.2-'s-Hertogenbosch

But it doesn't seem to matter how the .qgz file is opened, double click has the same effect - a simple project file with just one arbitrary layer is opened at 0,0 at scale 1:13. I've tried adjusting Project Properties -> View Settings -> Set Project Full Extent, but that doesn't have any effect.

It isn't a big deal once you recognize what is happening but it is rather disorienting when trying to share a project file.