Skip to content

Commit

Permalink
Update label select query
Browse files Browse the repository at this point in the history
  • Loading branch information
uurha committed Aug 11, 2024
1 parent 3daeec7 commit b4994b2
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,12 @@ private void ScheduleUpdateGeometry(GeometryChangedEvent changedEvent)
{
if (changedEvent.target is not PropertyField element) return;

element.schedule.Execute(() => OnGeometryChanged(element));
element.schedule.Execute(OnGeometryChanged);
}

private void OnGeometryChanged(PropertyField propertyField)
private void OnGeometryChanged()
{
var labels = propertyField.Query<Label>().Class(PropertyField.labelUssClassName).Where(field =>
{
var firstAncestor = field.GetFirstAncestorOfType<PropertyField>();
return firstAncestor != null && firstAncestor.Equals(propertyField);
});
var label = labels.First();
var label = RootElement.Query<Label>().Class(PropertyField.labelUssClassName).First();
if (label != null)
{
LabelContainer.Setup(label);
Expand Down

0 comments on commit b4994b2

Please sign in to comment.