Index: ui/file_manager/gallery/js/slide_mode.js |
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js |
index 0b7ea515bd69218530978af73f1f55edb026f411..ca348d57ae04cb88a595709b4ed2141d4a6c403a 100644 |
--- a/ui/file_manager/gallery/js/slide_mode.js |
+++ b/ui/file_manager/gallery/js/slide_mode.js |
@@ -750,7 +750,11 @@ SlideMode.prototype.loadItem_ = function( |
}.bind(this); |
this.editor_.openSession( |
- item, effect, this.saveCurrentImage_.bind(this), displayDone, loadDone); |
+ item, |
+ effect, |
+ this.saveCurrentImage_.bind(this, item), |
+ displayDone, |
+ loadDone); |
}; |
/** |
@@ -954,13 +958,13 @@ SlideMode.prototype.updateThumbnails = function() { |
/** |
* Save the current image to a file. |
* |
+ * @param {Gallery.Item} item Item to save the image. |
* @param {function} callback Callback. |
* @private |
*/ |
-SlideMode.prototype.saveCurrentImage_ = function(callback) { |
+SlideMode.prototype.saveCurrentImage_ = function(item, callback) { |
this.showSpinner_(true); |
- var item = this.getSelectedItem(); |
var savedPromise = this.dataModel_.saveItem( |
item, |
this.imageView_.getCanvas(), |