diff options
author | Jon Reid | 2012-06-29 14:21:08 -0700 |
---|---|---|
committer | Jon Reid | 2012-06-29 14:21:08 -0700 |
commit | f065c2bc664e9c8e4e97f8b6f6b684c310233f89 (patch) | |
tree | 5745bc6a6a4d08283f900492a0c5d437471d90ef /js/panels/Timeline/TimelinePanel.reel | |
parent | 3487d0596ff64a3bfbfc00e8187e34d9eb2ba0ab (diff) | |
download | ninja-f065c2bc664e9c8e4e97f8b6f6b684c310233f89.tar.gz |
Timeline: Bug fix: Unable to reselect a layer with control-click that was
previously just deselected with control-click. (Yes, that's a weird one.)
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 4c349247..7deaf0d1 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -1368,7 +1368,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1368 | arrLayersLength = arrLayers.length, | 1368 | arrLayersLength = arrLayers.length, |
1369 | targetIndex = 0, | 1369 | targetIndex = 0, |
1370 | isAlreadySelected = false, | 1370 | isAlreadySelected = false, |
1371 | indexAlreadySelected = 0, | 1371 | indexAlreadySelected = -5, |
1372 | indexLastClicked = 0, | 1372 | indexLastClicked = 0, |
1373 | ua = navigator.userAgent.toLowerCase(), | 1373 | ua = navigator.userAgent.toLowerCase(), |
1374 | boolCommandControlKeyIsPressed = false; | 1374 | boolCommandControlKeyIsPressed = false; |
@@ -1383,6 +1383,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1383 | boolCommandControlKeyIsPressed = true; | 1383 | boolCommandControlKeyIsPressed = true; |
1384 | } | 1384 | } |
1385 | } | 1385 | } |
1386 | |||
1386 | 1387 | ||
1387 | // Did the mousedown event originate within a layer? | 1388 | // Did the mousedown event originate within a layer? |
1388 | if (ptrParent === false) { | 1389 | if (ptrParent === false) { |
@@ -1400,17 +1401,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1400 | 1401 | ||
1401 | // Did we just click on a layer that's already selected? | 1402 | // Did we just click on a layer that's already selected? |
1402 | if (this.currentLayersSelected !== false) { | 1403 | if (this.currentLayersSelected !== false) { |
1403 | indexAlreadySelected = this.currentLayersSelected.indexOf(targetIndex); | 1404 | for (i = 0; i < this.currentLayersSelected.length; i++) { |
1405 | if (this.currentLayersSelected[i] === targetIndex) { | ||
1406 | indexAlreadySelected = i; | ||
1407 | } | ||
1408 | } | ||
1404 | } | 1409 | } |
1405 | if (indexAlreadySelected > -1) { | 1410 | if (indexAlreadySelected > -1) { |
1406 | isAlreadySelected = true; | 1411 | isAlreadySelected = true; |
1407 | } | 1412 | } |
1408 | |||
1409 | /* | ||
1410 | if (targetIndex > -1) { | ||
1411 | indexLastClicked = targetIndex; | ||
1412 | } | ||
1413 | */ | ||
1414 | 1413 | ||
1415 | // Now, do the selection based on all of that information. | 1414 | // Now, do the selection based on all of that information. |
1416 | if (this.currentLayersSelected.length === 0) { | 1415 | if (this.currentLayersSelected.length === 0) { |
@@ -1425,7 +1424,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1425 | // or remove it if it's already there. | 1424 | // or remove it if it's already there. |
1426 | if (this.currentLayersSelected === false) { | 1425 | if (this.currentLayersSelected === false) { |
1427 | this.currentLayersSelected = []; | 1426 | this.currentLayersSelected = []; |
1428 | //this.currentLayerSelected = false; | ||
1429 | } | 1427 | } |
1430 | if (isAlreadySelected === false) { | 1428 | if (isAlreadySelected === false) { |
1431 | this.currentLayersSelected.push(targetIndex); | 1429 | this.currentLayersSelected.push(targetIndex); |
@@ -1457,9 +1455,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1457 | this.currentLayersSelected = [targetIndex]; | 1455 | this.currentLayersSelected = [targetIndex]; |
1458 | this.lastLayerClicked = targetIndex; | 1456 | this.lastLayerClicked = targetIndex; |
1459 | } | 1457 | } |
1460 | |||
1461 | } | 1458 | } |
1462 | //this._captureSelection = true; | ||
1463 | this.selectLayers(this.currentLayersSelected); | 1459 | this.selectLayers(this.currentLayersSelected); |
1464 | this.updateStageSelection(); | 1460 | this.updateStageSelection(); |
1465 | } | 1461 | } |