-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reparent()
losing owner
#81506
Fix reparent()
losing owner
#81506
Conversation
reparent()
losing ownerreparent()
losing owner
I think this makes sense, but let me bring a couple of points up:
|
this doesn't feel much less patchy, but maybe we can include a in the meantime i'll get the docs checked and updated properly edit: on thinking about this it would also need to propagate this property to children before reparenting. i see what you mean about the changes on an elemental level. this feels like a pretty big thread to be pulling on. |
That would be very hacky and prone to issues, like leaving pointers to the old owner when the nodes are no longer in a relationship. What Pedro suggests is much more robust and in line with how we often do stuff. And also much simpler. |
i guess the issue i'm seeing (and realizing my original solution is definitely inadequate for) is that children of the reparented node will lose their i also may have misunderstood the original intention here! i was under the impression that you would want to keep the owner during reparent, even if the new parent doesn't share a branch with the original parent. |
Owner must be an ancestor of the node. If after reparenting this is no longer the case, then losing the owner is the correct behavior. |
my mistake! so i think the assessment of this is the nodes being reparented need to be checked for who their i apologize, i'm sure it's obvious that i'm also familiarizing myself with the idiomatic way of doing things as i go and want to make sure this is done correctly, but it definitely ended up being a bit more involved than i anticipated 😅 |
No need to apologize! You're trying, learning and addressing feedback. You can't be asked for more. |
btw turns out the label "good first issue" was wrongly assigned on this one. It's more complex than I anticipated, sorry 🙃 |
all good! i appreciate the patience everybody. once i'm back in town middle of next week i'll sit down and get this worked out. |
here's a first pass at a way to resolve all of the needs of this fix. it's, admittedly, an extremely naive take - my c++ experience is about ten years out of use at this point and was already rusty as i was using it, haha. i'm welcome to any recommendations as a result, and if this needs to be a more fundamental change, then so be it! as it stands i'm a little uncertain how this might be taken as it involves three iterations in order to solve the original issue, which is a bit undesired, i feel like. |
37ffe72
to
099c51a
Compare
... once i fix all of the style issues, of course. |
41ff19d
to
e9def5e
Compare
I will likely add new comments in the future (as soon as I can reason carefully about this). That said, your C++ is fine. (And if it's "rusty," well, it's trendy. 😃) |
hi! i just wanted to see if there was any chance to check this out a little more. if not, no problem, but i would love to be able to contribute a fix if possible. |
This is still under my radar, but I have been too busy. I will come back very soon! |
no problem at all! i appreciate the update, i also know it's probably gotten quite a bit busier with all of the new people recently :) |
7384dcc
to
4a3dd25
Compare
not a nitpick at all! i, uh, didn't realize i had been taking everybody else on the same journey i had been going on while updating this PR |
4a3dd25
to
a4629be
Compare
Sorry for stepping in when everything looked settled. Just a few minor things I think can be improved. |
a4629be
to
b4aa6ad
Compare
no problem! i'm definitely also learning as i go with this experience so it's useful for me as well |
For the record, we discussed this together with other PR with Yuri and Clay from the production team and decided that this wasn't critical for 4.2 (which is nearing release candidate), and might need some testing to ensure everyone agrees with the behavior change, hence the milestone bump to 4.3. It should likely be good to merge as soon as dev reopens for 4.3 in a few weeks. |
sounds good - i think that's completely reasonable given this is a fairly common action |
hi! just wanted to check in and see if this is still a good candidate for 4.3, and if there's anything else required of me to assess/change |
The review comments you marked as resolved but didn't apply maybe? Or at least explain why not applying them since you marked them as resolved 🙂 |
hmm, i'm not really sure... i applied all of the requested changes as far as i know, so i'm not certain why it's saying that there are more changes. maybe i missed one? reviewing the four requested changes i do see, i did enact them all before listing them as resolved (at the very least, the current version of the code reflects those changes) |
Unresolved the ones you didn't apply 🙂 |
ahh okay - the ones from KoBeWi were previously applied, but i had changed them out based on later requested changes by RandomShaper. they were resolved at the time though they do conflict now, is there a consensus on which direction i should go with those particular lines? |
Then resolved, my bad, the change is correct 🙂 the interface is confusing when it considers code not outdated when it's changed back and forth 🙃 |
not a problem at all, and i appreciate the check! i just wanted to be sure i wasn't missing anything, haha agreed on it not being intuitive as well, it'd be super cool if it noted that there were conflicting requested changes lol |
Thanks! And congrats for your first merged Godot contribution 🎉 |
This doesn't seem to be included in changelog |
correct me if i'm wrong, but i think this would only be in there if it is a part of a release. this missed the dev 2 window so it won't be in engine until dev 3 at earliest |
The interactive changelog isn't updated automatically, it was last synced when I released 4.2-dev2. So yeah changes merged after dev2 aren't reflected yet. |
Fixes #81480, but I am open to suggestions on any changes that need to be made - I just took the most obvious path suggested in the issue for a fix.
Thanks!