summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2022-09-02 21:15:04 +0300
committerYuri Sizov <yuris@humnom.net>2022-09-02 21:15:04 +0300
commit74fc44a242160181c4e2f20c958b47e30f53b424 (patch)
treeba7519bdb11f3a40d0199042b74b22b822e2ac5b
parent3fe3c4399b56e24ebef5222b25044c2a18bbf55a (diff)
Fix property revert logic in the sectioned inspector
Co-authored-by: derammo <817160+derammo@users.noreply.github.com>
-rw-r--r--editor/editor_sectioned_inspector.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index 94ee741db5..e078bea037 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -113,18 +113,13 @@ class SectionedInspectorFilter : public Object {
}
}
- bool property_can_revert(const StringName &p_name) {
+ bool _property_can_revert(const StringName &p_name) const {
return edited->property_can_revert(section + "/" + p_name);
}
- Variant property_get_revert(const StringName &p_name) {
- return edited->property_get_revert(section + "/" + p_name);
- }
-
-protected:
- static void _bind_methods() {
- ClassDB::bind_method("property_can_revert", &SectionedInspectorFilter::property_can_revert);
- ClassDB::bind_method("property_get_revert", &SectionedInspectorFilter::property_get_revert);
+ bool _property_get_revert(const StringName &p_name, Variant &r_property) const {
+ r_property = edited->property_get_revert(section + "/" + p_name);
+ return true;
}
public: