Commit 956bccf0 authored by Sergey Luzyanin's avatar Sergey Luzyanin

copu selected objects in group

parent 8d94e301
......@@ -951,9 +951,12 @@ Slide.prototype =
copySelectedObjects: function(){
var aSelectedObjects, i, fShift = 5.0;
var oSelector = this.graphicObjects.selection.groupSelection ? this.graphicObjects.selection.groupSelection : this.graphicObjects;
aSelectedObjects = [].concat(this.graphicObjects.selectedObjects);
aSelectedObjects = [].concat(oSelector.selectedObjects);
oSelector.resetSelection(undefined, false);
var bGroup = this.graphicObjects.selection.groupSelection ? true : false;
if(bGroup){
oSelector.normalize();
}
for(i = 0; i < aSelectedObjects.length; ++i){
var oCopy = aSelectedObjects[i].copy();
oCopy.x = aSelectedObjects[i].x;
......@@ -968,11 +971,14 @@ Slide.prototype =
this.addToSpTreeToPos(undefined, oCopy);
}
else{
oCopy.setGroup(oSelector);
oSelector.addToSpTree(undefined, oCopy);
oCopy.setGroup(aSelectedObjects[i].group);
aSelectedObjects[i].group.addToSpTree(undefined, oCopy);
}
oSelector.selectObject(oCopy, 0);
}
if(bGroup){
oSelector.updateCoordinatesAfterInternalResize();
}
},
Get_AllImageUrls: function(images)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment