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/image_editor/image_editor.js

Issue 1766343002: Gallery: Update edit-mode-applicavilities even if it's a instant auto fix, and update them on undo/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/image_editor/image_editor.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_editor.js b/ui/file_manager/gallery/js/image_editor/image_editor.js
index 9040fe6926ceb02bf292f2fce0999e9bcdcff47e..636b3d9857afc6fb063c6578c093d3139fe11786 100644
--- a/ui/file_manager/gallery/js/image_editor/image_editor.js
+++ b/ui/file_manager/gallery/js/image_editor/image_editor.js
@@ -323,6 +323,7 @@ ImageEditor.prototype.updateUndoRedo = function() {
var canRedo = this.commandQueue_ && this.commandQueue_.canRedo();
ImageUtil.setAttribute(this.undoButton_, 'disabled', !canUndo);
ImageUtil.setAttribute(this.redoButton_, 'disabled', !canRedo);
+ this.calculateModeApplicativity_();
};
/**
@@ -635,6 +636,7 @@ ImageEditor.prototype.setUpMode_ = function(mode) {
this.currentMode_.setUp();
+ this.calculateModeApplicativity_();
yawano 2016/03/07 11:16:18 setUpMode_ is called when user has clicked each mo
ryoh 2016/03/07 11:55:09 That's right! I introduce new callback, ImageEdito
if (this.currentMode_.instant) { // Instant tool.
this.leaveModeInternal_(true, false /* not to switch mode */);
return;
@@ -645,7 +647,6 @@ ImageEditor.prototype.setUpMode_ = function(mode) {
this.modeToolbar_.clear();
this.currentMode_.createTools(this.modeToolbar_);
this.modeToolbar_.show(true);
- this.calculateModeApplicativity_();
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698