Skip to content

Commit

Permalink
Merge pull request #42 from techno-dwarf-works/feature/refactoring
Browse files Browse the repository at this point in the history
Version 0.0.39
  • Loading branch information
uurha committed Aug 10, 2024
1 parent 828f488 commit 28b3da6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions Editor/Drawers/Container/ElementsContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,12 @@ private void ScheduleUpdateGeometry(GeometryChangedEvent changedEvent)
element.schedule.Execute(() => OnGeometryChanged(element));
}

private void OnGeometryChanged(VisualElement element)
private void OnGeometryChanged(PropertyField propertyField)
{
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 =>
var labels = propertyField.Query<Label>().Class(PropertyField.labelUssClassName).Where(field =>
{
var firstAncestor = field.GetFirstAncestorOfType<PropertyField>();
return firstAncestor != null && firstAncestor.Equals(parentField);
return firstAncestor != null && firstAncestor.Equals(propertyField);
});
var label = labels.First();
if (label != null)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.tdw.better.commons",
"displayName": "Better Commons",
"version": "0.0.38",
"version": "0.0.39",
"unity": "2021.3",
"description": " ",
"dependencies": {
Expand Down

0 comments on commit 28b3da6

Please sign in to comment.