Don't fire 'selection:created' if only one object exists

This commit is contained in:
Stefan Kienzle 2013-10-23 09:18:07 +02:00
parent 22de867310
commit 9c6565491b

View file

@ -476,11 +476,13 @@
activeGroup.removeWithUpdate(target);
this._resetObjectTransform(activeGroup);
target.set('active', false);
if (activeGroup.size() === 1) {
// remove group alltogether if after removal it only contains 1 object
this.discardActiveGroup();
// activate last remaining object
this.setActiveObject(activeGroup.item(0));
return;
}
}
else {