Fix Document#getSelectedItems & Path#setSegments.

This commit is contained in:
Jonathan Puckey 2011-04-22 12:30:38 +02:00
parent 578269d0c1
commit 538f360a6b
2 changed files with 3 additions and 2 deletions

View file

@ -62,7 +62,7 @@ var Document = this.Document = Base.extend({
// TODO: return groups if their children are all selected, // TODO: return groups if their children are all selected,
// and filter out their children from the list. // and filter out their children from the list.
var items = []; var items = [];
Base.each(items, function(item) { Base.each(this._selectedItems, function(item) {
items.push(item); items.push(item);
}); });
return items; return items;

View file

@ -417,7 +417,8 @@ var Path = this.Path = PathItem.extend({
this[name] = value; this[name] = value;
}, []); }, []);
} else { } else {
this._segments.length = this._selectedSegmentCount = 0; this.setSelected(false);
this._segments.length = 0;
} }
for(var i = 0; i < length; i++) { for(var i = 0; i < length; i++) {
this._add(Segment.read(segments, i, 1)); this._add(Segment.read(segments, i, 1));