CI fixes.

This commit is contained in:
Huo Yaoyuan
2017-05-21 04:48:43 +08:00
parent 4a55666e03
commit 7357076c4d

View File

@ -87,8 +87,6 @@ namespace osu.Game.Graphics.Containers
get { return sections; } get { return sections; }
set set
{ {
if (value == sections) return;
foreach (var section in sections) foreach (var section in sections)
sectionsContainer.Remove(section); sectionsContainer.Remove(section);
@ -102,7 +100,7 @@ namespace osu.Game.Graphics.Containers
} }
private float headerHeight, footerHeight; private float headerHeight, footerHeight;
private MarginPadding originalSectionsMargin; private readonly MarginPadding originalSectionsMargin;
private void updateSectionsMargin() private void updateSectionsMargin()
{ {
if (sections.Count == 0) return; if (sections.Count == 0) return;
@ -125,17 +123,17 @@ namespace osu.Game.Graphics.Containers
originalSectionsMargin = sectionsContainer.Margin; originalSectionsMargin = sectionsContainer.Margin;
} }
float lastKnownScroll; private float lastKnownScroll;
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()
{ {
base.UpdateAfterChildren(); base.UpdateAfterChildren();
float headerHeight = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0); float headerH = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0);
float footerHeight = Footer?.LayoutSize.Y ?? 0; float footerH = Footer?.LayoutSize.Y ?? 0;
if (headerHeight != this.headerHeight || footerHeight != this.footerHeight) if (headerH != headerHeight || footerH != footerHeight)
{ {
this.headerHeight = headerHeight; headerHeight = headerH;
this.footerHeight = footerHeight; footerHeight = footerH;
updateSectionsMargin(); updateSectionsMargin();
} }