mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
Fixed panels sometimes not drawing children that came into view when their positions changed unexpectedly
This commit is contained in:
parent
8332f56237
commit
f0432ab981
2 changed files with 4 additions and 7 deletions
|
@ -26,6 +26,7 @@ Improvements
|
|||
Fixes
|
||||
- Fixed parents of elements that prevent spill not being notified properly
|
||||
- Fixed paragraphs sometimes not updating their position properly when hidden because they're empty
|
||||
- Fixed panels sometimes not drawing children that came into view when their positions changed unexpectedly
|
||||
|
||||
### MLEM.Data
|
||||
Improvements
|
||||
|
|
|
@ -118,14 +118,10 @@ namespace MLEM.Ui.Elements {
|
|||
private void ScrollChildren() {
|
||||
if (!this.scrollOverflow)
|
||||
return;
|
||||
var offset = new Vector2(0, -this.ScrollBar.CurrentValue);
|
||||
// we ignore false grandchildren so that the children of the scroll bar stay in place
|
||||
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true, true)) {
|
||||
if (!child.ScrollOffset.Equals(offset, Element.Epsilon)) {
|
||||
child.ScrollOffset = offset;
|
||||
this.relevantChildrenDirty = true;
|
||||
}
|
||||
}
|
||||
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true, true))
|
||||
child.ScrollOffset.Y = -this.ScrollBar.CurrentValue;
|
||||
this.relevantChildrenDirty = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
|
Loading…
Reference in a new issue