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

Geometries not selectionable when using global variables in symbology #1970

Closed
roedvingetrast opened this issue Jun 8, 2021 · 2 comments · Fixed by #2036
Closed

Geometries not selectionable when using global variables in symbology #1970

roedvingetrast opened this issue Jun 8, 2021 · 2 comments · Fixed by #2036

Comments

@roedvingetrast
Copy link

Hi there and first: much appreciation for the great project!

Example: The circles in the symbology in a point-Layer predefined in QGIS are shown to big in QField map canvas so I have to choose between making them smaller for QField, but then I can't see them properly anymore in QGIS – or leave them, as they are in QGIS and have too big symbols in QField.

To solve that, I used a rule based symbology with a filter like "variable" = 'value' AND @qgis_os_name = 'android' for QField and the value 'linux' for QGIS on my laptop. The symbology is displayed correctly and differs between the two operating systems. But doing so I can' select the points in the map canvas of QField anymore.

In this special case maybe I can use a workaround changeing the symbols size unit from mm to pixel, but because of printing purposes I would prefer to stay with mm in the whole project. And sometimes I want to use different symbols in QGIS/QField staying in the same project and without duplicate layers with changed symbology.

Reproduction Steps:

  1. Take a point layer, choose rule based symbology and enter something like

"variable" = 'value' AND @qgis_os_name = 'android'

as one rule and

"variable" = 'value' AND @qgis_os_name = 'linux'

as second rule (maybe you have to adjust the values android/linux to your own OS) and change the size/shape/color etc. of the symbols like you want it and you can see the difference between them clearly.

  1. Load the project onto your smartphone/tablet etc. and open it with QField, the symbols should be displayed correctly and different between QGIS/QField.

  2. Try to select a point of the point layer – it doesn't work.

Expected behavior:

Geometries still clickable/selectionable, even when using variables like "@qgis_os_name" in symbology.

Observed behavior:

Geometries not clickable/selectionable anymore when using variables mentioned above.

QField version: QField version 1.9.6 (d5dd01 v1.9.6)

Additional information:

  • Problem started happening recently, didn't happen in an older version of QField: I don't know, I'm relatively new to QField
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Yes
  • Problem happens with other variables: Not tested
@m-kuhn
Copy link
Member

m-kuhn commented Jul 7, 2021

Thank you for reporting this, a fix for the identify problem with @qgis_os_name is underway in #2036

Regarding the scaling issue, could you check the units that are used for the size of the symbols?
Set the units to mm and use a (physical) ruler to check the size of the symbols on screen.

Here's a local result for QField and QGIS:

image

This was done on a hidpi screen: QGIS shows symbols too small. QField shows them correctly.
I don't have a low dip screen at hand to test, but last time I checked, both showed it correctly there.
I.e. QGIS does not properly scale symbols on hidpi screen (so that's very likely an upstream / QGIS issue we are dealing with here)

@roedvingetrast
Copy link
Author

Hi m-kuhn,

thanks a lot for fixing, it seems to work now! I also appreciate the new function "Dim screen when idling"! Only issue in property menu now: when scrolling down, the menu always jumps to top again, so I can't change settings like "Use stylus pen". Maybe only in beta, because on 1.9.6 it works like expected.

On my old 86ppi screen and in QField on my smartphone with a 483ppi screen the size of symbols are shown correctly, on my laptop screen with a 96ppi screen the symbols are shown too small. I think, that refers to qgis/QGIS#41248

Still, the ruler doesn't work properly (shows too small length), but that's an issue already mentioned elsewhere.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants