Rename #_countSelectedSegment() to #_updateSelection().

This commit is contained in:
Jürg Lehni 2011-05-26 11:52:28 +01:00
parent 3e7806ae50
commit 8130ee458f
2 changed files with 4 additions and 4 deletions

View file

@ -238,7 +238,7 @@ var Path = this.Path = PathItem.extend({
// If parts of this segment are selected, adjust the internal
// _selectedSegmentCount now
if (segment._selectionState)
this._countSelectedSegment(segment);
this._updateSelection(segment);
}
if (append) {
// Append them all at the end by using push
@ -268,7 +268,7 @@ var Path = this.Path = PathItem.extend({
return segs;
},
_countSelectedSegment: function(segment) {
_updateSelection: function(segment) {
var count = this._selectedSegmentCount +=
segment._selectionState ? 1 : -1;
if (count <= 1)
@ -368,7 +368,7 @@ var Path = this.Path = PathItem.extend({
var segment = removed[i];
if (segment._selectionState) {
segment._selectionState = 0;
this._countSelectedSegment(segment);
this._updateSelection(segment);
}
// Clear the indices and path references of the removed segments
removed._index = removed._path = undefined;

View file

@ -289,7 +289,7 @@ var Segment = this.Segment = Base.extend({
// it's path know and possibly add or remove it from
// project._selectedItems
if (path && wasSelected != !!this._selectionState)
path._countSelectedSegment(this);
path._updateSelection(this);
},
// DOCS: Segment#selected