On selection, update selection in the model. Fixes selection.clone() error.

Change-Id: Ibd5cf0398002e5fbb2c50549e4a7043ba8fd00a7
This commit is contained in:
Rob Moen 2012-04-02 14:19:53 -07:00
parent c1300ba949
commit d8de26d7e9

View file

@ -34,6 +34,8 @@ ve.ce.Surface = function( $container, model ) {
if ( selection !== null ) {
// Keep a copy of the current selection on hand
_this.currentSelection = selection.clone();
// Tell the model what we have selected.
_this.model.select(_this.currentSelection);
// Respond to selection changes
_this.updateSelection();