diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-25 07:30:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 07:30:42 +0200 |
commit | 1adcd0327fd39fe322db7a4b7408827c87467f15 (patch) | |
tree | e42f45c1df4ec0ecd5635c890a87c9b6b87dc4b8 /scene/gui | |
parent | 6e390fa9abf2101f8772c4ef6694471153105636 (diff) | |
parent | 22fcdffd1726a82af43ef46fbdfbfc3dcf5c6bd0 (diff) |
Merge pull request #64806 from Zylann/graph_node_protected_validate_property
Make GraphNode::_validate_property protected so GraphNode can be inherited
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/graph_node.cpp | 4 | ||||
-rw-r--r-- | scene/gui/graph_node.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 1a478a5fe1..7d31e929dc 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -32,9 +32,7 @@ #include "core/string/translation.h" -#ifdef TOOLS_ENABLED #include "graph_edit.h" -#endif struct _MinSizeCache { int min_size; @@ -445,6 +443,7 @@ void GraphNode::_edit_set_position(const Point2 &p_position) { } set_position(p_position); } +#endif void GraphNode::_validate_property(PropertyInfo &p_property) const { GraphEdit *graph = Object::cast_to<GraphEdit>(get_parent()); @@ -454,7 +453,6 @@ void GraphNode::_validate_property(PropertyInfo &p_property) const { } } } -#endif void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left, const Ref<Texture2D> &p_custom_right, bool p_draw_stylebox) { ERR_FAIL_COND_MSG(p_idx < 0, vformat("Cannot set slot with p_idx (%d) lesser than zero.", p_idx)); diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 6d5bb4361e..d575b6ceed 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -101,7 +101,6 @@ private: #ifdef TOOLS_ENABLED void _edit_set_position(const Point2 &p_position) override; - void _validate_property(PropertyInfo &p_property) const; #endif protected: @@ -112,6 +111,7 @@ protected: bool _set(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List<PropertyInfo> *p_list) const; + void _validate_property(PropertyInfo &p_property) const; public: bool has_point(const Point2 &p_point) const override; |