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.51k stars 2.99k forks source link

Nested symbology not stacking #52151

Open e-shirt opened 1 year ago

e-shirt commented 1 year ago

What is the bug or the crash?

Using nested rule-based symbology, sometimes (could not yet reproduce, when and when not) the rules won't stack ontop of each other in the layer panel as parent-chield hierarchy with the option to collapse/expand entries.

I have some layers that work, some that don't, I can not distinguish, why. It happens and works with all types of geometry. image

Steps to reproduce the issue

  1. Go to layer symbology
  2. create a rule-based symbology
  3. drag and drop several entries on top of another to create a nested symbology
  4. see all entries without parent-child hierarchy in layer panel

Versions

QGIS-Version 3.28.0-Firenze QGIS-Codeversion ed3ad0430f3 Qt-Version 5.15.3 Python-Version 3.9.5 GDAL-Version 3.5.2 PROJ-Version 9.1.0 EPSG-Registraturdatenbankversion v10.074 (2022-08-01) GEOS-Version 3.10.3-CAPI-1.16.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 BS-Version Windows 10 Version 2009

Aktive Python-Erweiterungen GeometryShapes 0.7 Go2NextFeaturePlus 2.10 ImportPhotos 3.0.5 LoadQSS 1.4.2 mmqgis 2021.9.10 ORStools 1.5.2 OSMDataSync 0.2 OSMDownloader 1.0.3 processing_saga_nextgen 0.0.7 qdraw 3.0.2 qfieldsync v4.4.7 qgis-plugin-findreplace-main 1 qgis_resource_sharing 1.0.0 qNote 2.2 QuickOSM 2.1.1 quick_map_services 0.19.33 valhalla 2.3.0 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

Jean-Roc commented 1 year ago

I had this issue with an project created with an older version of QGIS, could you try to :

e-shirt commented 1 year ago

I just did that, and the problem persists also in a blank new project. I have another point layer with nested symbology, that is working in my project and also works in an new project as well as a line layer that ist not working in my or any new project.

A collegue tried these steps on another machine with the same data and gets the same results.

I still can not tell what exactly enforces the issue. It randomly happened on line and point layers (haven't had any issues with polygons, yet). If it happens, to a dataset, it happens to that dataset all the time while other datasets don't have these problems. I have had these problems till now on shapefile, geopackage and spatialite layers.

e-shirt commented 1 year ago

I just realised another bug that I think is linked to this: When I right click a symbol in the layer panel and copy it, it will not insert the same symbol in another layer.

In my case: I copied the circle symbols and applied them to another layer. However, inserted were the triangles. When I copy the triangle, I also get a triangle, when I copy the pentagon, I get a pentagon. I cannot get a circle though: image

I also further tested on the root problem here: I have a different dataset with different column names where I have applied the same symbology. Apparently it does not depend on

The dataset from my OP was a geopackage, this one is a csv. I can export the csv to a geopackage and the symbology still works as expected though.

wernerlievens commented 1 year ago

I had posted a similar request: https://github.com/qgis/QGIS/issues/53277 In this request i have added some files that might be helpful. Maybe someone can have a look at these?

jteez commented 8 months ago

So, just to note, I thought this was a bug but it depends where you grab (to drag and drop) the rules and where you dop them, I found it consitently works if you grab it from the symbol (just to the right of the checkbox) and drop it over the symbol (justo to the right of the checkbox) of the one you want to nest it into... if you grab from the rule (where the text is) it doesn't let you nest it....

wernerlievens commented 8 months ago

Hi jteez, Thank you for your reply. I have tried it but it does not seem to work for me. Maybe I'm doing it wrong. Is it possible to make a small movie and send it to me so that I'm sure I'm doing it correctly? Regards

jteez commented 7 months ago

As I went to film something I realised it isn't actually behaving as I thought but more when you pick up a rule from the left side of the text ('lable' colum') you can see more what you're doing... Also I notice that it only allows you to nest when you precisly hover over the label of the rule you want to nest under. You can see it highlights it with a black box if it will nest and with an bar underneath if not. You can see all the different positions that it is trying to move the rules to as I drag and drop from and too different areas... I hope it helps.

https://github.com/qgis/QGIS/assets/11745072/601efc16-33a2-470d-b709-2ce5ddccd138