Bug report #6665
Layer grouping bug in legend
|Affected QGIS version:||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 #:||15839|
Not sure where this may affect functionality beyond the QgsApp::duplicateLayers() method, but...
When using duplicateLayers() on a selection inside a group, where that group has more than 4 items and the selection is after the fourth item, the duplicated layer(s) is added to the QgsMapLayerRegistry, but not added to the legend. If any layer past 4 items is moved to one of the first 4 item placements (i.e. directly under the grouping) then the layer works properly when duplicated. I have no idea why the number of layers in a grouping would have any affect on adding layers to QgsMapLayerRegistry.
It seems to have no bearing on what type of layer is being duplicated, or which group it is associated with. Currently, duplicateLayers() works around this by manually adding the QgsLegendLayer(s) after determining that those layers did not get added to the legend.
#2 Updated by Médéric RIBREUX over 4 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
Hello, bug triage...
I can't reproduce it under QGIS 2.12 and master. It seems to have been fixed because I can duplicate anything in a group whatever layer is selected.
I am closing this bug...