mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +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
|
Fixes
|
||||||
- Fixed parents of elements that prevent spill not being notified properly
|
- 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 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
|
### MLEM.Data
|
||||||
Improvements
|
Improvements
|
||||||
|
|
|
@ -118,14 +118,10 @@ namespace MLEM.Ui.Elements {
|
||||||
private void ScrollChildren() {
|
private void ScrollChildren() {
|
||||||
if (!this.scrollOverflow)
|
if (!this.scrollOverflow)
|
||||||
return;
|
return;
|
||||||
var offset = new Vector2(0, -this.ScrollBar.CurrentValue);
|
|
||||||
// we ignore false grandchildren so that the children of the scroll bar stay in place
|
// 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)) {
|
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true, true))
|
||||||
if (!child.ScrollOffset.Equals(offset, Element.Epsilon)) {
|
child.ScrollOffset.Y = -this.ScrollBar.CurrentValue;
|
||||||
child.ScrollOffset = offset;
|
this.relevantChildrenDirty = true;
|
||||||
this.relevantChildrenDirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
Loading…
Reference in a new issue