Commit f184997
fix ship select roster scroll-up getting stuck after list shrinks (scp-fs2open#7501)
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>1 parent 880bfb1 commit f184997
2 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
| 1063 | + | |
| 1064 | + | |
1064 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1065 | 1070 | | |
1066 | 1071 | | |
1067 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3307 | 3307 | | |
3308 | 3308 | | |
3309 | 3309 | | |
3310 | | - | |
3311 | | - | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
3312 | 3316 | | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
3313 | 3321 | | |
3314 | 3322 | | |
3315 | 3323 | | |
| |||
0 commit comments