dlr-gtlab / gtlab-core

GTlab Core Framework
https://www.gtlab.de
Other
7 stars 2 forks source link

GtObjectMemento::toObject does not set the parent in the correct order #358

Closed rainman110 closed 9 months ago

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Dec 6, 2022, 10:15

Summary

The refactoring of the memento system introduced a bug as the order of initialization changed when creating a new object.

What is the current bug behavior?

In the new system the parent was set after the properties were merged. This resulted in a few problems if a class had a slot funtion connected to a property changed event, which accessed the parent object. When merging the object the parent was not set yet.

What is the expected correct behavior?

see above

Relevant logs and/or screenshots

Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Possible fixes

Revert the order of initialization when creating a new object

rainman110 commented 1 year ago

In GitLab by @rainman110 on Dec 6, 2022, 10:24

mentioned in commit 0e303b80e9bba1a8e23d842e95827f23880bd621

rainman110 commented 1 year ago

In GitLab by @rainman110 on Dec 6, 2022, 10:25

created branch 358-gtobjectmemento-toobject-does-not-set-the-parent-in-the-correct-order to address this issue

rainman110 commented 1 year ago

In GitLab by @rainman110 on Dec 6, 2022, 11:31

mentioned in commit 39b9e33fbc53ae7b6e0e15eb2dfb46dfb52bef05