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.37k stars 2.98k forks source link

Scale listbox do not working in QGIS version 3.30.0-'s-Hertogenbosch #52383

Closed micdeluca closed 1 year ago

micdeluca commented 1 year ago

What is the bug or the crash?

Scale listbox do not working in QGIS version 3.30.0-'s-Hertogenbosch. Scale_listbox

Steps to reproduce the issue

Open QGIS and click on scale listbox.

Versions

QGIS version | 3.30.0-'s-Hertogenbosch | QGIS code revision | f186b8efe0e -- | -- | -- | -- Qt version | 5.15.3 Python version | 3.9.5 GDAL/OGR version | 3.6.2 PROJ version | 9.1.1 EPSG Registry database version | v10.076 (2022-08-31) GEOS version | 3.11.1-CAPI-1.17.1 SQLite version | 3.39.4 PDAL version | 2.4.3 PostgreSQL client version | unknown SpatiaLite version | 5.0.1 QWT version | 6.1.6 QScintilla2 version | 2.13.1 OS version | Windows 10 Version 2009   |   |   |   Active Python plugins db_manager | 0.1.20 grassprovider | 2.12.99 MetaSearch | 0.3.6 processing | 2.12.99 QGIS version 3.30.0-'s-Hertogenbosch QGIS code revision [f186b8efe0e](https://github.com/qgis/QGIS/commit/f186b8efe0e) Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.2 PROJ version 9.1.1 EPSG Registry database version v10.076 (2022-08-31) GEOS version 3.11.1-CAPI-1.17.1 SQLite version 3.39.4 PDAL version 2.4.3 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009 Active Python plugins db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 ### Supported QGIS version - [X] I'm running a supported QGIS version according to the roadmap. ### New profile - [X] I tried with a new QGIS profile ### Additional context _No response_
pigreco commented 1 year ago

I confirm

OSGeo4W 64 Win 10 64

nicogodet commented 1 year ago

It seems that default scale are not listed anymore. In project properties, you can define predefined project scale and they are listed in combobox. image image

micdeluca commented 1 year ago

True, if you define the default scales at the individual project level the listbox works. However, you would expect the listbox to already work with the default scales at the general options level, and this does not happen.

agiudiceandrea commented 1 year ago

It seems to me this issue may be related to commit https://github.com/qgis/QGIS/commit/26bf85f57b8828f1ada7a55eb21abf02973d44af from PR https://github.com/qgis/QGIS/pull/51728.

pigreco commented 1 year ago

The problem is still present!!! It seems that default scale are not listed anymore.

https://user-images.githubusercontent.com/7631137/229541026-58bd95f9-d929-41c9-960c-06aebbd9b8d1.mp4

QGIS 3.30.1 e 3.31 MASTER

3nids commented 1 year ago

It works for me.

Do you have predefined scales in application settings (or is it blank)? if not, can you try again with a new profile in your project properties? if not, I guess they were deleted somehow.

micdeluca commented 1 year ago

In QGIS 3.30.1 the scale listbox works. Try restoring the default scales in Setting->Option->Map Tools.

pigreco commented 1 year ago

@3nids @micdeluca

The problem is that they look like this: Setting->Option->Map Tools. image

so it must be the end user to fix them

agiudiceandrea commented 1 year ago

@3nids, using the same user profile created in QGIS 3.28:

Creating a new user profile with QGIS 3.30, the Predefined Scales list is empty: image

3nids commented 1 year ago

If I delete the predefined scales in the app settings and re-open QGIS they are set back to default. Can you try this?

And which commit are you using?

agiudiceandrea commented 1 year ago

@3nids, QGIS 3.30.1 on Windows (OSGeo4W).

Using QGIS 3.30 with a new user profile, the Predefined Scales list (in Setting->Option->Map Tools) is empty, while it should contain the predefined scales like using QGIS 3.28 and previous versions with a new user profile.

QGIS 3.30 stores the scales in QGIS3.ini as scales=1:1000000, 1:500000, 1:250000, 1:100000, 1:50000, 1:25000, 1:10000, 1:5000, 1:2500, 1:1000, 1:500 while QGIS 3.28 and previous versions as scales="1:1000000,1:500000,1:250000,1:100000,1:50000,1:25000,1:10000,1:5000,1:2500,1:1000,1:500". This seems to create a useless and preferably avoidable incompatibility.

agiudiceandrea commented 1 year ago

See also https://github.com/qgis/QGIS/pull/52511.

3nids commented 1 year ago

The scales are saved as a QStringList and not a QString anymore. The change in the ini file is expected (see https://stackoverflow.com/a/27558297/1548052)

Can you go to the advanced settings, delete the scale setting: image save and reopen QGIS?

agiudiceandrea commented 1 year ago
3nids commented 1 year ago

"The scales are saved as a QStringList and not a QString anymore": this means the QGIS user Profile <= 3.28 are incompatible with QGIS 3.30 and vice versa at least for the predefined map scales setting and the map scales list combobox. Is this expected? If yes, I think the users should be informed about such incompatibility. Anyway I would have preferred no incompatibility.

There is a migration of setting in place, so going from 3.28 to 3.30 should come without any issue to the user.

I wonder if you could try with https://github.com/qgis/QGIS/pull/52511 being merged now? (that might explain why I don't have any issue on my machine)

agiudiceandrea commented 1 year ago

I wonder if you could try with #52511 being merged now?

Testing the MinGW64 Windows Build from PR https://github.com/qgis/QGIS/pull/52511:

The author of the PR https://github.com/qgis/QGIS/pull/52511 stated that it does not fix this issue.

GvdDool commented 1 year ago

Question: Does the change from QString to QStringList change/affect the dropdown box's construction in the status bar?

I am working on a Windows 13'' laptop with Full HD 1080 and have to disable the mScaleWidget in the Status bar to read the other elements in the bar because the width of the dropdown box is claiming all the space on the bar, compressing all the other items. I think this is due to the length of the QStringList, and that the width of the dropdown box, in the current version, is obtained from the list of elements and not the longest string in the list.

image