Skip to content

Clone of grouped shapes return incorrect size/position coordinates #1085

@mszbot

Description

@mszbot

Problem:
I have 2 grouped shapes on a slide. The right hand side grouped shape is a clone of the left, I simply copy-pasted it.

Reading the shape's size and position of the clone is incorrect. It provides the size and position of the left hand side grouped shapes.

Test template:
Grouped.shapes.test.pptx

Image

Expected result:
All shapes should return the size and position as shown in PowerPoint GUI.

This is what the GUI shows for the chart shapes (inside the grouped shapes).
Image

This is what python-pptx returns when you look up the size and position of all the shapes on this slide:

Shape ID: 9, Name: Group 8, Pos=(493.2, 128.88), Size=(428.96 x 342.21)
(Group contains:)
  Shape ID: 4, Name: Chart 3, Pos=(59.92, 200.16), Size=(474.32 x 301.17)
  Shape ID: 5, Name: TextBox 4, Pos=(135.36, 129.6), Size=(318.96 x 31.59)

Shape ID: 10, Name: Group 9, Pos=(71.92, 122.4), Size=(360.8 x 343.41)
(Group contains:)
  Shape ID: 11, Name: Chart 10, Pos=(59.92, 200.16), Size=(474.32 x 301.17)
  Shape ID: 12, Name: TextBox 11, Pos=(135.36, 129.6), Size=(318.96 x 31.48)

Notice shape ID 4 & 11 have the same size/position, as does shape ID 5 & 12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions