Skip to content

Commit

Permalink
Update ElementsContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
uurha committed Aug 6, 2024
1 parent 71b6a0f commit bd60f2d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ private void OnGeometryChanged(VisualElement element)
var propertyPath = SerializedProperty.propertyPath;
var propertyFields = element.Query<PropertyField>().Where(field => field.bindingPath.CompareOrdinal(propertyPath)).Build();
var parentField = propertyFields.First();
var labels = parentField.Query<Label>().Class(PropertyField.labelUssClassName).Where(field => field.parent.Equals(parentField));
var labels = parentField.Query<Label>().Class(PropertyField.labelUssClassName).Where(field =>
{
var firstAncestor = field.GetFirstAncestorOfType<PropertyField>();
return firstAncestor != null && firstAncestor.Equals(parentField);
});
var label = labels.First();
if (label != null)
{
Expand Down

0 comments on commit bd60f2d

Please sign in to comment.