Bug report #19120
Saved default style in spatialite file not available when loaded
|Affected QGIS version:||3.0.3||Regression?:||Yes|
|Operating System:||Linux x64||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||26950|
Related to #11944.
Trying to save and load a default style saved in a spatialite file. The default styles are not loaded in the spatialite file after reloading.
1. In this example spatialite file, there are three layers, one each as point, linear, and polygon. Each layer style is saved similarly.
2. Using the drop-down dialogs at the bottom of the "Layer Properties - Symbology" window: "Style --> Save Style --> Save in Database (spatialite) -->"
3. In the dialog window that pops up titled "Save Style in Database" give it a filename aka "point", skip the description, and check the checkbox for "Use as default style for this layer."
4. Start a new project. After loading the layers from the spatialite file, none of the saved default styles are applied.
5. Furthermore, when attempting to load a style from the "Database Styles Manager" under "Other styles on (sic) the database" while the two default styles for the other feature types are listed, the style for the current one is not. (It should probably read "Other styles WITHIN the database")
6. This is repeatable for each layer of different feature type in the "Database Styles Manager": The default style for the layer in question is not present but the other default styles for the different feature types are. However, none of the features open with their default styles loaded.
#1 Updated by Whit Alexander about 2 years ago
Related or same issue on Windows 10, QGIS 3.0.3, code revision 8a899c8758.
Database Styles Manager reports "No styles found in the database" under "Styles related to the layer" for Spatialite layers even immediately after having saved a style for the layer.
This is more serious than the recurring concern about default styles not loading properly. I am unable to load any newly saved style. They simply do not appear in either list of styles within the database styles manager.
Steps to repro:
1) Load a multi-point geometry spatialite layer
2) Change symbology in any notable way
3) Save style in database with name TEST POINT
4) Open Database Styles Manager
5) Observe that TEST POINT style not shown in either list
6) Repeat steps with multi-polygon geometry layer using TEST POLY for style name
7) Observe that TEST POINT style shows in "Other styles on the database", but TEST POLY shows in neither list
8) Return to properties for multi-point layer
9) Observe that TEST POLY style appears in "Other styles on the database", but TEST POINT shows in neither list
#2 Updated by Whit Alexander about 2 years ago
Reproduced in Bonn. Confirmed not an issue in Las Palmas.
Reproduced with new spatialite DB.
Perhaps I should log this as a new issue as it's not Linux and goes well beyond the impact suggested by the original subject. Styles database manager effectively unusable within spatialite it seems.
Please consider escalating priority of this issue.