Segment#isSelected() only checks for selection state of point. We need to check _selectionState instead to mirror behaviour in #_setSelected().

This commit is contained in:
Jürg Lehni 2011-04-28 19:04:00 +01:00
parent d098c6e8b2
commit 6d84dc3351

View file

@ -208,8 +208,10 @@ var Segment = this.Segment = Base.extend({
remove: function() {
if (this._path) {
this._path._segments.splice(this.getIndex(), 1);
if (this.isSelected())
if (this._selectionState) {
this._path._selectedSegmentCount--;
this._selectionState = 0;
}
return true;
}
return false;