Bug report #6591
topoviewer: layers are not under their group anymore
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15782|
I clearly remember having added a layer group to put all layers into, but as of bbecffdb659ce3b5d33d11fa93290f7c04b9cbff I see that the group is created but no layer is put into it. Sounds like a regression, or a change in core API ?
#2 Updated by Sandro Santilli over 7 years ago
After further research it turns out that the main problem is within the core API itself, in that the Legend.addGroup function returns a useless int index. I say useless because that index is obtained by QModelIndex.row() but at scan time (in Legend.moveLayer) printing the .row() of every item's QModelIndex shows a lot of duplicates, so it doesn't seem like the Legend.addGroup return value can be used to really identify a group.