give the "Set as Player Ship" button exclusive semantics in both editors#7605
Merged
JohnAFernandez merged 1 commit intoJul 15, 2026
Merged
Conversation
In single-player missions, the "Set as Player Ship" button is supposed to make the selected ship the one and only player start. FRED did this correctly, but qtFRED routed the button through the same setPlayer() toggle used by the multiplayer "Player Ship" checkbox, which only promoted the selected ship and never demoted the previous player start. Since the checkbox is disabled in single player, there was no way to demote the old start, so single-player missions could accumulate multiple player starts. Consolidate the exclusive logic into a shared helper, set_single_player_start() in missioneditor/common.cpp, and call it from both FRED's OnSetAsPlayerShip() and a new qtFRED model method, makeSolePlayerStart(), which the button now uses. This also avoids setPlayer()'s early return on stale dialog state, which could cause the button to silently do nothing. Follow-up to scp-fs2open#7600. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JohnAFernandez
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In single-player missions, the "Set as Player Ship" button is supposed to make the selected ship the one and only player start. FRED did this correctly, but qtFRED routed the button through the same setPlayer() toggle used by the multiplayer "Player Ship" checkbox, which only promoted the selected ship and never demoted the previous player start. Since the checkbox is disabled in single player, there was no way to demote the old start, so single-player missions could accumulate multiple player starts.
Consolidate the exclusive logic into a shared helper, set_single_player_start() in missioneditor/common.cpp, and call it from both FRED's OnSetAsPlayerShip() and a new qtFRED model method, makeSolePlayerStart(), which the button now uses. This also avoids setPlayer()'s early return on stale dialog state, which could cause the button to silently do nothing.
Follow-up to #7600.