QtFRED Trim The Fat#7457
Open
MjnMixael wants to merge 1 commit into
Open
Conversation
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.
Removes a lot of dead code and FRED2 era cruft that QtFRED doesn't use, especially in editor.cpp. This was mostly briefing related code from before briefing dialog got it's own viewport and some other code that's been long commented out.
Some notes:
This does remove some commented out code intended to be used for a navigate to sexp usage upon obj delete feature. That is still on my todo list but I don't want to be beholden to past attempts. So yeet it all now and provide a clean slate.
cur_wing_indexis removed entirely. It was copied from FRED2 where even there it is dead, only written to and never read. The loops that set this variable are also removed.Editor::lcl_fred_replace_stuff(QString&)was also dead. It was added by Goober way back in 2023 and never used. All models run with SCP_string through the version in localize.cpp which is the preferred way anyway. Keeping this overload present and synced is just busy work. Yeetdelete_flagwas really just a shadow of information that already flows naturally through the existingdelete_object() == 2return value. All six original writes of this flag to 1 were just before those functions returned 2 so we just use that and simplify the whole thing.OBJ_POINTis an object type exclusive to FRED2 now. It's used by FRED2's briefing editor for icons. QtFRED uses the in-mission briefing renderer, so icons are not objects here.. they're just icons. The only create calls for OBJ_POINT now are in the FRED2 project. Once FRED2 is deprecated, that whole object type can go with it.