Closed danec020 closed 3 months ago
The new changes submitted should address all the concerns mentioned by @eidloi.
NOTE: There is a sliced_test.rs and simple_test.rs example that I have added to my fork that can be used to test this edge case. When merging, these files can be ignored but may be helpful when confirming.
Now all remaining children who are not related to the requested zone will shift up if necessary. This creates it's own issues since the UI layout will possibly change. The result will be a sliced zone that has a sliced zone child containing only a label. When this happens the child will be removed and the label will shift up to the parent sliced zone. This seems like the logical solution but may need to be reconsidered?
Also with these changes, removed zones will grab their SizedZoneResizeHandleContainer children so they don't clutter up the hierarchy after the zone is despawned.
No problem. Sorry to have wasted your time.
No problem. Sorry to have wasted your time.
You didn't waste it mate! Your research is valuable, and will contribute to the overall fix!
Added comments and renamed variable to the previous changes to make it more understandable. I found using the longer variable names made it much easier to follow the flow of the logic due to the finicky nature of dealing with children's children of parent's children ect...
This part was removed from IF statement to see how many sized_zones are children of the tab's parent but could be used later if you need to propagate other type of widgets up to the parent of the removed zone?