Skip to content

Commit

Permalink
BUGFIX PHPOffice#820 createDrawingShape stopped working in 1.1.0
Browse files Browse the repository at this point in the history
Added setContainer in ShapeCollection::addShape().
  • Loading branch information
kw-pr authored Nov 27, 2024
1 parent 04700ed commit d6b4f23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PhpPresentation/Traits/ShapeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ public function addShape(AbstractShape $shape)
{
$this->shapeCollection[] = $shape;

if (method_exists($shape, 'setContainer') && $shape->getContainer() === null) {
$shape->setContainer($this);
}

return $this;
}

Expand Down

0 comments on commit d6b4f23

Please sign in to comment.