You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Make _validate_property a multilevel method
This commit is contained in:
@@ -446,12 +446,11 @@ void GraphNode::_edit_set_position(const Point2 &p_position) {
|
||||
set_position(p_position);
|
||||
}
|
||||
|
||||
void GraphNode::_validate_property(PropertyInfo &property) const {
|
||||
Control::_validate_property(property);
|
||||
void GraphNode::_validate_property(PropertyInfo &p_property) const {
|
||||
GraphEdit *graph = Object::cast_to<GraphEdit>(get_parent());
|
||||
if (graph) {
|
||||
if (property.name == "position") {
|
||||
property.usage |= PROPERTY_USAGE_READ_ONLY;
|
||||
if (p_property.name == "position") {
|
||||
p_property.usage |= PROPERTY_USAGE_READ_ONLY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user