diff --git a/src/document/Document.js b/src/document/Document.js index 2e65e99a..287a220b 100644 --- a/src/document/Document.js +++ b/src/document/Document.js @@ -62,7 +62,7 @@ var Document = this.Document = Base.extend({ // TODO: return groups if their children are all selected, // and filter out their children from the list. var items = []; - Base.each(items, function(item) { + Base.each(this._selectedItems, function(item) { items.push(item); }); return items; diff --git a/src/path/Path.js b/src/path/Path.js index fc19ff87..33d64adb 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -417,7 +417,8 @@ var Path = this.Path = PathItem.extend({ this[name] = value; }, []); } else { - this._segments.length = this._selectedSegmentCount = 0; + this.setSelected(false); + this._segments.length = 0; } for(var i = 0; i < length; i++) { this._add(Segment.read(segments, i, 1));