Layer user notes only available for QgsVectorLayer when reading a project with flag QgsProject.FlagDontResolveLayers #58818
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
What is the bug or the crash?
When a
QgsProject
is read from a file with flagQgsProject.FlagDontResolveLayers
we can get layer user notes only forQgsVectorLayer
I looked into the code for differences between
QgqVectorLayer
and other layer (for instanceQgsRasterLayer
).For
QgsRasterLayer
the main difference is that we never load symbology if the data provider is not set (consequence of theQgsProject.FlagDontResolveLayers
flags:QGIS/src/core/raster/qgsrasterlayer.cpp
Lines 2410 to 2420 in 6bf3ee0
Steps to reproduce the issue
There should be a layer note available for all layers.
Versions
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Active Python plugins
plugin_reloader
0.11
french_locator_filter
1.1.1
processing
2.12.99
MetaSearch
0.3.6
grassprovider
2.12.99
db_manager
0.1.20
menu_from_project
2.2.0-beta1
Supported QGIS version
New profile
Additional context
I need to access layer user note for the plugin https://plugins.qgis.org/plugins/menu_from_project/
This plugin allow user to have a menu with all layer and group inside a QGIS project.
To avoid manual parsing of the .xml for QGIS project we would like to go with a
QgsProject
that already have all the needed informations.The text was updated successfully, but these errors were encountered: