Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qgs3daxissettings: Correctly read viewport ratio on a saved project #54870

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

ptitjano
Copy link
Contributor

@ptitjano ptitjano commented Oct 6, 2023

Description

When loading a project which contains a 3D view, the 3D axis is not visible even when it is supposed to be displayed. This is because the min and max viewport ratio settings are always equal to 0 on a saved project. Indeed, these settings are supposed to handle the 3D axis visibility when the 3D view size changes: the axis are hidden when the view becomes too small.
These ratio are stored as double between 0 and 1. However, the logic which reads these parameters from a saved
project (Qgs3DAxisSettings::readXml) parses them as integer. Therefore, the min and max ratio are always equal to 0. Then, the 3D axis visibility test is always false and the 3D axis are always hidden.

This issue is fixed by changing Qgs3DAxisSettings::readXml to read the ratios as double.

cc @benoitdm-oslandia

@github-actions github-actions bot added this to the 3.34.0 milestone Oct 6, 2023
When loading a project which contains a 3D view, the 3D axis is not
visible even when it is supposed to be displayed. This is because the
min and max viewport ratio settings are always equal to 0 on a saved
project. Indeed, these settings are supposed to handle the 3D axis
visibility when the 3D view size changes: the axis are hidden when the
view becomes too small.
These ratio are stored as double between 0 and 1. However, the logic
which reads these parameters from a saved
project (`Qgs3DAxisSettings::readXml`) parses them as
integer. Therefore, the min and max ratio are always equal to 0. Then,
the 3D axis visibility test is always false and the 3D axis are always
hidden.

This issue is fixed by changing `Qgs3DAxisSettings::readXml` to read
the ratios as double.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering backport queued_ltr_backports Queued Backports
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants