Bug report #19960
layer tree embedded widget provider's supportsLayer() method is never called
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Map Legend | ||
Affected QGIS version: | 3.3(master) | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27782 |
Description
The `QgsLayerTreeEmbeddedWidgetProvider` class defines a virtual method `supportsLayer()` that should be called in order to check if the provider supports adding widgets to specific layers. This method is currently not called anywhere in QGIS' code base.
This means that custom providers cannot really target their widgets to specific layers
For more in this please check out this thread on qgis-dev mailing list, where the issue was originally brought up:
https://lists.osgeo.org/pipermail/qgis-developer/2018-September/054662.html
History
#1 Updated by Alessandro Pasotti about 6 years ago
- Resolution set to invalid
- Status changed from Open to Rejected
it's used in QgsLayerTreeEmbeddedConfigWidget::setLayer
#2 Updated by Ricardo Silva about 6 years ago
Alessandro Pasotti wrote:
it's used in QgsLayerTreeEmbeddedConfigWidget::setLayer
yes, it is now used in `QgsLayerTreeEmbeddedConfigWidget::setLayer`, after I have submitted a PR with the change and it having been merged nine days ago.
https://github.com/qgis/QGIS/pull/8066
So I guess this should be closed with a `fixed/implemented` instead.
#3 Updated by Giovanni Manghi about 6 years ago
- Resolution changed from invalid to fixed/implemented
- Status changed from Rejected to Closed
Thanks Ricardo!