Merge pull request #407 from hwmaier/feature/enable-progressive-bug

Clear previously applied operations when doing a reset on image files to avoid calling filters twice
This commit is contained in:
Andy Miller
2015-11-01 09:42:29 -07:00
2 changed files with 9 additions and 0 deletions

View File

@@ -9,6 +9,14 @@ class ImageFile extends \Gregwar\Image\Image
{
use GravTrait;
/**
* Clear previously applied operations
*/
public function clearOperations()
{
$this->operations = [];
}
/**
* This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
*

View File

@@ -260,6 +260,7 @@ class ImageMedium extends Medium
if ($this->image) {
$this->image();
$this->image->clearOperations(); // Clear previously applied operations
$this->filter();
}