ObjectSet::documentBounds report incorrect bounds for some groups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
I wanted to test a new feature I wrote where objects are replaced by their intersection with all relevant clipping paths.
I stumbled upon some weird behaviour of ObjectSet:
I wrote a test where I add rects to a set, move them around and group them:
In line 772 the set is grouped and in line 787 the result of documentBounds is compared to the previous result which is different.
This might be related to the code which calculates bboxes for groups where the transforms for children of the group is handled:
And the function i2anc_affine which handles the transforms of all ancestors of a SPObject:
I thought that both methods handling transforms might cause transforms to be applied twice but I couldn't get it working right by removing the transform handling code from SPGroup and now I'm out of ideas.
I fixed one issue where grouping a single rect which was previously moved lead to the wrong bbox: I added bbox_valid = false where the bbox might be changed.
I tried to disable the cache by removing "if (!bbox_valid)", didn't change anything. I also can't reproduce it in the GUI.