-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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 current field not updating after pasting value #78603
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks safer for sure.
CC @ajreckof |
This will not supersede #78591 As this does not fix #78590 but #78591 will in fact supersede this. I'm not sure about the way to update the property here as it will not fix the inconsistency with other places where calling emit changed with You could on the other hand call update property from the emit_changed callback but only the property needed. This would need to store esitor properties but shouldn't be too hard. Edit : I just realised this PR does not fix the first issue (neither does my suggestion) as it won't work when type has changed because each editor property can only handle one type and therefore it can't show the new value since it has an invalid type. This might even create errors or crash when updating the property will require the correct type |
Doesn't seem as safe as I initially thought, as it actually will update in more cases when pasting.
For some cases in |
I think the proper solution to avoid too much update is to rework update_property to be a bit more intelligent and only destroy/recreate that do need because they were either added removed or type changed. But I feel like this is something that can wait for 4.2 |
It is impossible to solve the case where a value of a different type is copied to an element of |
Reverts #76711 and supersedes #76711.
Fixes #75124, fixes #78578.
This commit only updates the field that is currently affected.