Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: ui/file_manager/gallery/js/ribbon.js

Issue 310433004: Gallery.app: Update thumbnail when a file is edited on the photo editor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/ribbon.js
diff --git a/ui/file_manager/gallery/js/ribbon.js b/ui/file_manager/gallery/js/ribbon.js
index 779d97ce7aa5f408769b580939da0a74267e16e4..f56e21a75f3cc7f398e363ac9a1d73ef2c06b72b 100644
--- a/ui/file_manager/gallery/js/ribbon.js
+++ b/ui/file_manager/gallery/js/ribbon.js
@@ -344,7 +344,13 @@ Ribbon.prototype.setThumbnailImage_ = function(thumbnail, entry, metadata) {
*/
Ribbon.prototype.onContentChange_ = function(event) {
var url = event.item.getEntry().toURL();
- this.remapCache_(event.oldEntry.toURL(), url);
+ if (event.oldEntry.toURL() !== url) {
+ this.remapCache_(event.oldEntry.toURL(), url);
+ } else {
+ delete this.renderCache_[url];
+ var index = this.dataModel_.indexOf(event.item);
+ this.renderThumbnail_(index);
+ }
var thumbnail = this.renderCache_[url];
if (thumbnail && event.metadata)
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698