Update checked based on the variant type of the value
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()`.
This commit is contained in:
parent
c2babb6558
commit
9066d55763
2 changed files with 26 additions and 14 deletions
|
|
@ -151,7 +151,7 @@ public:
|
|||
void set_doc_path(const String &p_doc_path);
|
||||
|
||||
virtual void update_property();
|
||||
void update_revert_and_pin_status();
|
||||
void update_editor_property_status();
|
||||
|
||||
virtual bool use_keying_next() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue