-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Update checked based on the variant type of the value #60786
Update checked based on the variant type of the value #60786
Conversation
Looks good overall, but I'm not familiar enough with the exact mechanics of theme overriding to be confident to approve. |
For using Lines 533 to 540 in 066692b
Lines 389 to 396 in 066692b
Lines 336 to 365 in 066692b
For |
8807edf
to
87e4036
Compare
87e4036
to
0f6c074
Compare
In `EditorProperty::update_revert_and_pin_status`, if `checkable` is `true`, update `checked` based on the variant type of the value, and rename the function as `EditorProperty::update_editor_property_status`. **Known problems:** 1. Unable to check Checkbox for properties of type `Object` when it is unchecked. This is probably because during value store/fetch, the `nullptr` (variant type is `Variant::OBJECT`) eventually becomes `Variant()` (variant type is `Variant::NIL`). 2. For theme overrides, click the revert icon will uncheck the Checkbox. This is probably because `EditorPropertyRevert::get_property_revert_value` returns `Variant()`.
0f6c074
to
9066d55
Compare
Thanks! |
In
EditorProperty::update_revert_and_pin_status
, ifcheckable
istrue
, updatechecked
based on the variant type of the value, and rename the function asEditorProperty::update_editor_property_status
.This patch can fix #55455.
Known problems:
Object
when it is unchecked. This is probably because during value store/fetch, thenullptr
(variant type isVariant::OBJECT
) eventually becomesVariant()
(variant type isVariant::NIL
).EditorPropertyRevert::get_property_revert_value
returnsVariant()
.