pass color and font when duplacting

Fix commit 42b4c9c0 .
This commit is contained in:
abakkk 2020-09-16 17:38:54 +02:00
parent 81bce359f9
commit 1d73d9f0e3
1 changed files with 4 additions and 0 deletions

View File

@ -516,6 +516,10 @@ var DrawingArea = new Lang.Class({
if (duplicate) {
// deep cloning
let copy = new this.grabbedElement.constructor(JSON.parse(JSON.stringify(this.grabbedElement)));
if (this.grabbedElement.color)
copy.color = this.grabbedElement.color;
if (this.grabbedElement.font)
copy.font = this.grabbedElement.font;
if (this.grabbedElement.image)
copy.image = this.grabbedElement.image;
this.elements.push(copy);