diff --git a/pptx/oxml/shapes/groupshape.py b/pptx/oxml/shapes/groupshape.py index e428bd79e..b9c622d65 100644 --- a/pptx/oxml/shapes/groupshape.py +++ b/pptx/oxml/shapes/groupshape.py @@ -145,6 +145,25 @@ def iter_shape_elms(self): if elm.tag in self._shape_tags: yield elm + if elm.tag == qn("ve:AlternateContent"): + choice = elm.find(qn("ve:Choice")) + + if choice != None: + for content in choice.iterchildren(): + #Choose first, among proper items + if content.tag in self._shape_tags: + yield content + break + else: + fallback = elm.find(qn("ve:Fallback")) + + if fallback != None: + for content in fallback.iterchildren(): + # Choose first, among proper items + if content.tag in self._shape_tags: + yield content + break + @property def max_shape_id(self): """Maximum int value assigned as @id in this slide.