Path#setSelected: do XOR correctly.

This commit is contained in:
Jonathan Puckey 2011-04-21 18:45:36 +02:00
parent cf2faa14e3
commit 7867a46c35

View file

@ -136,7 +136,7 @@ var Path = this.Path = PathItem.extend({
setSelected: function(selected) {
var wasSelected = this.getSelected();
var length = this._segments.length;
if (wasSelected != selected && length) {
if (!wasSelected != !selected && length) {
var selectedItems = this._document._selectedItems;
if (selected) {
selectedItems.push(this);