Skip to content

Commit

Permalink
Fix for shared inherited styles not being overridden by inline styles
Browse files Browse the repository at this point in the history
  • Loading branch information
geom3trik committed Apr 19, 2022
1 parent 8b62269 commit 001c20b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions core/src/storage/animatable_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ where
return true;
}
} else {
self.inline_data.sparse[entity_index] = InlineIndex {
data_index: DataIndex::shared(parent_sparse_index.data_index.index())
.inherited(),
anim_index: std::u32::MAX,
};
if !entity_sparse_index.data_index.is_inline() {
self.inline_data.sparse[entity_index] = InlineIndex {
data_index: DataIndex::shared(parent_sparse_index.data_index.index())
.inherited(),
anim_index: std::u32::MAX,
};
}
return true;
}
}
Expand Down
12 changes: 7 additions & 5 deletions core/src/storage/style_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,13 @@ where
return true;
}
} else {
self.inline_data.sparse[entity_index] = Index {
data_index: DataIndex::shared(parent_sparse_index.data_index.index())
.inherited(),
anim_index: std::u32::MAX,
};
if !entity_sparse_index.data_index.is_inline() {
self.inline_data.sparse[entity_index] = Index {
data_index: DataIndex::shared(parent_sparse_index.data_index.index())
.inherited(),
anim_index: std::u32::MAX,
};
}
return true;
}
}
Expand Down

0 comments on commit 001c20b

Please sign in to comment.