Skip to content

fix ship select roster scroll-up getting stuck after list shrinks#7501

Merged
BMagnu merged 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/6240
Jun 5, 2026
Merged

fix ship select roster scroll-up getting stuck after list shrinks#7501
BMagnu merged 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/6240

Conversation

@Goober5000
Copy link
Copy Markdown
Contributor

After a drag-drop that consumed the last unit of a roster class, the active list could shrink while SS_active_list_start was non-zero, making items above the stuck offset (including default ships returned to the pool, such as Seth fighters) unreachable: the up-arrow handler short-circuits when size <= max_show without resetting the offset.

  • Clamp the preserved scroll offset in ss_synch_interface() against SS_active_list_size - MAX_ICONS_ON_SCREEN.
  • Harden common_scroll_down_pressed() to reset *start to 0 when the whole list fits on screen.

Fixes #6240. Tested on the same Scroll mission from the stream, Thor's Hammer.

After a drag-drop that consumed the last unit of a roster class, the
active list could shrink while SS_active_list_start was non-zero,
making items above the stuck offset (including default ships returned
to the pool, such as Seth fighters) unreachable: the up-arrow handler
short-circuits when size <= max_show without resetting the offset.

- Clamp the preserved scroll offset in ss_synch_interface() against
  SS_active_list_size - MAX_ICONS_ON_SCREEN.
- Harden common_scroll_down_pressed() to reset *start to 0 when the
  whole list fits on screen.

Fixes scp-fs2open#6240

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Goober5000 Goober5000 added the fix A fix for bugs, not-a-bugs, and/or regressions. label Jun 5, 2026
@BMagnu BMagnu merged commit f184997 into scp-fs2open:master Jun 5, 2026
20 checks passed
@Goober5000 Goober5000 deleted the fix/6240 branch June 5, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship loadout ship select bug

3 participants