Commit e5a074a4 authored by David Reveman's avatar David Reveman Committed by Commit Bot

Change Picture: Fix captured image selection.

This fixes a regression introduced by
crrev.com/d4e5fdd3.

'image-activate' needs to fire when selected item is of
type OLD.

Test: captured image is activated when selected
Bug: 786887
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5ef20f00ef8581721463be33b667456a955e0b6d
Reviewed-on: https://chromium-review.googlesource.com/804834Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521174}
parent 89eeaa5a
......@@ -230,8 +230,7 @@ Polymer({
selected.dataset.type == CrPicture.SelectionTypes.CAMERA;
this.selectedItem = selected;
if (selected.dataset.type == CrPicture.SelectionTypes.OLD ||
selected.dataset.type == CrPicture.SelectionTypes.CAMERA) {
if (selected.dataset.type == CrPicture.SelectionTypes.CAMERA) {
if (activate)
this.fire('focus-action', selected);
} else if (
......@@ -246,9 +245,8 @@ Polymer({
*/
onIronActivate_: function(event) {
var type = event.detail.item.dataset.type;
// Don't change focus when activating the camera or current image via mouse.
var activate = type != CrPicture.SelectionTypes.OLD &&
type != CrPicture.SelectionTypes.CAMERA;
// Don't change focus when activating the camera via mouse.
var activate = type != CrPicture.SelectionTypes.CAMERA;
this.selectImage_(event.detail.item, activate);
},
......
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