Source Code Project Mantis - FSSCP
View Issue Details
0003068FSSCPuser interfacepublic2014-06-21 00:312014-12-22 01:48
Assigned ToMageKing17 
PlatformOSOS Version
Product Version3.7.0 
Target Version3.7.2Fixed in Version3.7.2 
Summary0003068: Popup wordwrapping problem related to PF_TITLE_BIG
DescriptionWordwrapping in the popup code works differently for title lines (the first line of the popup if PF_TITLE or PF_TITLE_BIG is used); this isn't normally a problem, but in one particular case, the "title" is a somewhat-lengthy message and PF_TITLE_BIG exacerbates the problem.

Screenshot attached, and linked here:
Steps To Reproduce1) Open FSO.
2) Select a pilot in "multi" mode.
3) Hit your "delete" key.
4) Observe the text going outside the bounds of the popup window.
Additional InformationI've verified that the bug shows up at least as far back as 3.7.0, but I'm not sure where to find a string long enough try to trigger the bug in an earlier build; obviously, if it can be triggered in an older build, different Steps To Reproduce will be necessary.
TagsNo tags attached.
Attached Filespng fs2_open_3_7_1_SSE2 2014-06-20 20-56-30-04.png (364,587) 2014-06-21 00:31
patch 3068_easy.patch (781) 2014-09-13 15:11
patch 3068_proper.patch (908) 2014-12-22 01:45

2014-09-11 19:30   
(Last edited: 2014-09-13 15:09)
I feel profoundly... unobservant for not noticing this when I originally investigated the issue, but the problem here is that it's a one-line popup using PF_TITLE_BIG, and "title" lines aren't subject to normal wordwrapping (they use a width of 1000 regardless of the popup window's width).

"Easy" solution is to just change PF_TITLE_BIG to PF_BODY_BIG (which, despite my claim in the initial report, works fine). "Proper" solution should probably be to refactor the code in playermenu.cpp so that hitting DEL has the same effect as clicking the "remove" button; the popup in that case is more verbose and its title line is an actual title instead of the body of the message.

2014-12-22 01:46   
Doing it the "proper" way turned out to be a lot easier than I expected. I think this is simple enough it should probably make it into 3.7.2.
2014-12-22 01:48   
Fix committed to trunk@11202.

Issue History
2014-06-21 00:31MageKing17New Issue
2014-06-21 00:31MageKing17File Added: fs2_open_3_7_1_SSE2 2014-06-20 20-56-30-04.png
2014-06-21 01:47MageKing17Description Updatedbug_revision_view_page.php?rev_id=823#r823
2014-09-11 19:30MageKing17Note Added: 0016276
2014-09-11 19:40MageKing17SummaryPopup wordwrapping malfunctioning when PF_BODY_BIG flag set. => Popup wordwrapping problem related to PF_TITLE_BIG
2014-09-11 19:40MageKing17Description Updatedbug_revision_view_page.php?rev_id=912#r912
2014-09-11 19:42MageKing17Assigned To => MageKing17
2014-09-11 19:42MageKing17Statusnew => assigned
2014-09-13 15:09MageKing17Note Edited: 0016276bug_revision_view_page.php?bugnote_id=16276#r916
2014-09-13 15:11MageKing17File Added: 3068_easy.patch
2014-12-22 01:45MageKing17File Added: 3068_proper.patch
2014-12-22 01:46MageKing17Note Added: 0016430
2014-12-22 01:46MageKing17Statusassigned => code review
2014-12-22 01:46MageKing17Fixed in Version => 3.7.2
2014-12-22 01:46MageKing17Target Version => 3.7.2
2014-12-22 01:48MageKing17Changeset attached => fs2open trunk r11202
2014-12-22 01:48MageKing17Note Added: 0016431
2014-12-22 01:48MageKing17Statuscode review => resolved
2014-12-22 01:48MageKing17Resolutionopen => fixed