Bug report #6591
topoviewer: layers are not under their group anymore
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | DB Manager | ||
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 |
Description
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 ?
Associated revisions
Fix addGroup to return the integer groupIndex other methods expect
This commit fixes #6591, although doesn't make the existing
interface any better than it is, and it is really bad :)
No plugin should need any adaption with the changes.
History
#1 Updated by Sandro Santilli about 12 years ago
I've found that sometimes they are and sometimes they are not.
I think it depends on the presence of another layer when starting the topoviewer.
#2 Updated by Sandro Santilli almost 12 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.
#3 Updated by Sandro Santilli almost 12 years ago
This bug would be fixed by merging this pull request in core: https://github.com/qgis/Quantum-GIS/pull/351
#4 Updated by Sandro Santilli almost 12 years ago
- Status changed from Open to Closed
Fixed in changeset 677095f7911cb0e2af91004cf37dfc988d75eded.