Open flamigoalexander opened 3 months ago
I didn't change the deleteSelector method because it works correctly and deletes the parent selector and its childs as it should be. In my opinion, the problem here in the updateSelector method, which uses deleteSelector, although in theory the selector may not be deleted, but an existing one can be changed.
Also, I must say that my solution has a bug. It keeps the child selectors, but the grandchildren are removed(children's children). I couldn't find an efficient way to cascade through all child selectors. So I think I need some help about this
I'm also not sure about VAR, but I think that because it has functional variable scope, and is therefore only accessible from the updateSelectror method, this should not cause any major problems
What happens if you encounter a selector that is a parent of itself?
Previously, when changing a selector type, all of its childrens were deleted, even if the new selector type supported child selectors. This change fixes it by creating a copy of the child selectors and adding them as children to the new parent. (TALCR-538)