Uncommented the increment of $imageCounter (#205)

The static variable $imageCounter previously had a constant value of 0 throughout the program as it was never being modified, because it was commented out by mistake.

Now it increments every time a new drawing is being instantiated.

This also fixed a problem when multiple images of same name in the same worksheet are incorrectly displayed.

Fixes #204
Closes #205
This commit is contained in:
Davis Devasia 2017-09-09 00:13:12 +05:30 committed by Adrien Crivelli
parent 5dd18586a2
commit 41a1aa9ede
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ class BaseDrawing implements IComparable
$this->rotation = 0; $this->rotation = 0;
$this->shadow = new Drawing\Shadow(); $this->shadow = new Drawing\Shadow();
// Set image index++self::$imageCounter; // Set image index
++self::$imageCounter;
$this->imageIndex = self::$imageCounter; $this->imageIndex = self::$imageCounter;
} }