RS_Entity* RS_EntityContainer::clone() const{
    RS_DEBUG->print("RS_EntityContainer::clone: ori autoDel: %d",
                    autoDelete);

    RS_EntityContainer* ec = new RS_EntityContainer(*this);
    ec->setOwner(autoDelete);

    RS_DEBUG->print("RS_EntityContainer::clone: clone autoDel: %d",
                    ec->isOwner());

    ec->detach();
    ec->initId();

    return ec;
}
Ejemplo n.º 2
0
RS_Entity* RS_EntityContainer::clone() {
    RS_EntityContainer* ec = new RS_EntityContainer(*this);
    ec->detach();
    ec->initId();
    return ec;
}