Skip to content

Copy-paste ImageSkin duplicates Texture component as well #13

Description

@b005t3r

In the editor:

  • create Texture
  • set Texture's bitmapData to any bitmap
  • create ImageSkin
  • set ImageSkin's texture to Texture
  • copy & paste ImageSkin

Current behaviour: New ImageSkin instance is pasted, but its internal DisplayObject is never validated, so nothing is displayed. Texture instance is serialized and deserialized along with the ImageSkin instance (new Texture instance is created in effect). Copied Texture is never added to scene nor validated (by validateNow() call), so its internal texture never gets created. Copied ImageSkin instance relies on this texture when creating its internal DisplayObject.

Expected behaviour: Copied ImageSkin instance should use the same Texture instance as the original one does. No new Texture instance should be created.

Probably this problem does not only occur with ImageSkins and Textures, but with any objects copied & pasted, which reference other object, outside of the copied object hierarchy.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions