Login  Register

Re: Question about RS_EntityContainer

Posted by sand1024 on Dec 29, 2024; 7:19pm
URL: https://forum.librecad.org/Question-about-RS-EntityContainer-tp5725899p5725900.html

well, that's a good question indeed...

The only thing I can imagine for such implementation - is something as following:

1) container is created
2) entities are added into it (and they may be either without parent or have old parent)
3) everything is reparented to the new parent.

Yet even with such scenario - it's more natural to force children be reparented to the container itself, not to the parent of the container...

The current implementation flatten the hierarchy, and I can't say right now what is specific reason for this.
I think for proper addressing your question, it is necessary to revise all methods that deals with hierarchical child->parent logic.

I suspect that some subtle side effects may occur there if this implementation is changed, so this issue definitely requires deeper investigations.