diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 15:32:16 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 15:32:16 +0200 |
commit | d4f841858249075614fa553390774a8ad6c3ba36 (patch) | |
tree | efb14460f50bc59436a57f4a303772b035d9f878 /editor | |
parent | aa42b4f0cb448deb200cec67a11d272d3caf46f5 (diff) | |
parent | 056a418862f3288742b718983e60c04f4f410f61 (diff) |
Merge pull request #66080 from Zylann/editor_property_set_read_only
Expose `EditorProperty._set_read_only` virtual method
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_inspector.cpp | 5 | ||||
-rw-r--r-- | editor/editor_inspector.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 413eb52556..fb819f418b 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -426,6 +426,9 @@ void EditorProperty::_set_read_only(bool p_read_only) { void EditorProperty::set_read_only(bool p_read_only) { read_only = p_read_only; + if (GDVIRTUAL_CALL(_set_read_only, p_read_only)) { + return; + } _set_read_only(p_read_only); } @@ -985,6 +988,8 @@ void EditorProperty::_bind_methods() { ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx"))); GDVIRTUAL_BIND(_update_property) + GDVIRTUAL_BIND(_set_read_only, "read_only") + ClassDB::bind_method(D_METHOD("_update_editor_property_status"), &EditorProperty::update_editor_property_status); } diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index b7df5a8037..872007e637 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -120,6 +120,8 @@ private: HashMap<StringName, Variant> cache; GDVIRTUAL0(_update_property) + GDVIRTUAL1(_set_read_only, bool) + void _update_pin_flags(); protected: |