From 25f920ebcb593bbff242165de3d10f8d29fae19b Mon Sep 17 00:00:00 2001 From: maddavo <1432875+maddavo@users.noreply.github.com> Date: Thu, 10 Sep 2026 23:21:45 +1000 Subject: [PATCH 1/2] Fix heat loop list scroll content --- CHANGELOG.md | 1 + Source/UI/ToolbarUI/ToolbarLoops.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3267421..6da6f60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased - Improved performance - Color animations no longer update all materials when they haven't changed. +- Fixed the heat-loop list scroll content not expanding when a vessel has more loops than fit in the viewport. ## 0.9.1 - 2026-05-12 - Fixed memory leaks from dangling event handlers. diff --git a/Source/UI/ToolbarUI/ToolbarLoops.cs b/Source/UI/ToolbarUI/ToolbarLoops.cs index a66a2a0..6ef37ef 100644 --- a/Source/UI/ToolbarUI/ToolbarLoops.cs +++ b/Source/UI/ToolbarUI/ToolbarLoops.cs @@ -135,6 +135,11 @@ protected void RecalculatePanelPositionData() Utils.Log($"Source data: buttonYOffsetFromTop={buttonYOffsetFromTop }, loopPanelMaxHeight={loopPanelMaxHeight} widgetTotalHeight={widgetTotalHeight}", LogType.UI); //loopPanelWidgets.Count * 68f + vlg.padding.top+vlg.padding.bottom+ 3f+7.5f*(loopPanelWidgets.Count-1); loopPanelRootRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, loopPanelMaxHeight); + // The ScrollRect content must contain the complete list. Previously only + // the viewport was resized, leaving the content at its prefab height when + // more loops were added than could be shown at once. That made some loop + // widgets unreachable or appear to be missing from the list. + loopPanelScrollRootRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, widgetTotalHeight); loopPanelScrollViewportRect.anchorMin = loopPanelScrollBackground.anchorMin = new Vector2(0, 0); loopPanelScrollViewportRect.anchorMax = loopPanelScrollBackground.anchorMax = new Vector2(1, 0); loopPanelScrollCarat.anchorMin = new Vector2(0, 1); From 6237ab6bff6211ffa2bab10228785eed407f0f32 Mon Sep 17 00:00:00 2001 From: maddavo <1432875+maddavo@users.noreply.github.com> Date: Thu, 10 Sep 2026 23:31:49 +1000 Subject: [PATCH 2/2] Keep heat loop widgets ordered by ID --- Source/UI/ToolbarUI/ToolbarLoops.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/UI/ToolbarUI/ToolbarLoops.cs b/Source/UI/ToolbarUI/ToolbarLoops.cs index 6ef37ef..6bbe9d5 100644 --- a/Source/UI/ToolbarUI/ToolbarLoops.cs +++ b/Source/UI/ToolbarUI/ToolbarLoops.cs @@ -120,6 +120,15 @@ void PollLoopWidgets(SystemHeatSimulator simulator) RecalculatePanelPositionData(); } } + + // Heat loops are discovered by walking vessel parts, so their creation + // order is not guaranteed to match their numeric IDs. Keep the content + // order stable and predictable for the player. + loopPanelWidgets.Sort((left, right) => left.TrackedLoopID.CompareTo(right.TrackedLoopID)); + for (int i = 0; i < loopPanelWidgets.Count; i++) + { + loopPanelWidgets[i].transform.SetSiblingIndex(i); + } } protected void RecalculatePanelPositionData() {