-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inspection of graphics scenes with nested items
The SceneModel had a broken parent() implementation, it always returned row = 0 for toplevel items, instead of looking up the position in the topLevelItems() list. While at it, make this model more robust against the fact that the order of QGraphicsItem::childItems() can change due to stackBefore() or changing the Z order, so sort that list (by pointer address) to make it stable. There's still one way to break that model: QGraphicsItem::setParentItem(). But that's for another day.
- Loading branch information
1 parent
08ad63c
commit a6a55e1
Showing
2 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters