Photo Editor async processing fix

BUG=chromium-os:23613
TEST=

Review URL: http://codereview.chromium.org/8769036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112694 0039d316-1c4b-4281-b951-d872f2087c98
parent ed966587
...@@ -332,7 +332,14 @@ ImageEditor.prototype.enterMode = function(mode, event) { ...@@ -332,7 +332,14 @@ ImageEditor.prototype.enterMode = function(mode, event) {
} }
this.leaveModeGently(); this.leaveModeGently();
// The above call could have caused a commit which might have initiated
// an asynchronous command execution. Wait for it to complete, then proceed
// with the mode set up.
this.commandQueue_.requestCurrentImage(
this.setUpMode_.bind(this, mode, event));
};
ImageEditor.prototype.setUpMode_ = function(mode, event) {
this.currentTool_ = event.target; this.currentTool_ = event.target;
ImageUtil.setAttribute(this.currentTool_, 'pressed', true); ImageUtil.setAttribute(this.currentTool_, 'pressed', true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment