add cylinder

This commit is contained in:
AndreaRigoni
2026-03-24 15:22:50 +00:00
parent b45cde0bad
commit 51e6dbb4f5
11 changed files with 523 additions and 121 deletions

View File

@@ -75,7 +75,8 @@ void Object::RegisterProperty(PropertyBase* prop) {
void Object::RegisterDynamicProperty(PropertyBase* prop) {
if (prop) {
d->m_DynamicProperties.push_back(prop);
d->m_Properties.push_back(prop);
// Note: prop already added itself to m_Properties
// during its own constructor call to owner->RegisterProperty()
}
}
@@ -114,8 +115,9 @@ template void Object::serialize(Archive::log_archive &, const unsigned int);
// OBJECT IMPLEMENTATION
Object::Object() : d(new ObjectPrivate) {}
Object::Object(const Object &copy) : d(new ObjectPrivate(*copy.d)) {}
Object::Object(const Object &copy) : d(new ObjectPrivate) {
if (copy.d) d->m_InstanceName = copy.d->m_InstanceName;
}
Object::~Object() {
for (auto* p : d->m_DynamicProperties) {
@@ -125,9 +127,11 @@ Object::~Object() {
}
void Object::DeepCopy(const Object &copy) {
// should lock to be tread safe //
memcpy(d, copy.d, sizeof(ObjectPrivate));
// ERROR! does not copy parameters ... <<<< FIXXXXX
if (this == &copy) return;
if (copy.d) d->m_InstanceName = copy.d->m_InstanceName;
// Note: signals, slots and properties are intentionally not copied
// to maintain instance uniquely and avoid duplicate registrations.
this->Updated();
}
void Object::SaveXml(std::ostream &os, Object &ob) {