2018-05-27 07:04 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003145FSSCPFREDpublic2015-02-23 22:03
ReporterAxem 
Assigned ToMageKing17 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
Product Version 
Target VersionFixed in Version 
Summary0003145: Texture replace dialog entries are offset by one
DescriptionThe dialog appears to actually change the entry below the one currently selected. (-glow was right under the gtbrhea-unit02 in the list)
TagsNo tags attached.
Attached Files
  • png file icon texturereplacebroken.png (104,169 bytes) 2015-02-21 15:23 -
    png file icon texturereplacebroken.png (104,169 bytes) 2015-02-21 15:23 +
  • patch file icon 3145.patch (1,528 bytes) 2015-02-22 16:55 -
    Index: code/fred2/fred.rc
    ===================================================================
    --- code/fred2/fred.rc	(revision 11257)
    +++ code/fred2/fred.rc	(working copy)
    @@ -1928,7 +1928,7 @@
         PUSHBUTTON      "Cancel",IDCANCEL,239,35,50,14
         LTEXT           "Old texture:",IDC_LABEL1,7,7,44,9
         LTEXT           "New texture:",IDC_LABEL2,152,7,44,9
    -    COMBOBOX        IDC_OLD_TEXTURE_LIST,7,16,137,85,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
    +    COMBOBOX        IDC_OLD_TEXTURE_LIST,7,16,137,85,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     END
     
     IDD_SPECIAL_HITPOINTS DIALOG  0, 0, 234, 85
    Index: code/fred2/shiptexturesdlg.cpp
    ===================================================================
    --- code/fred2/shiptexturesdlg.cpp	(revision 11257)
    +++ code/fred2/shiptexturesdlg.cpp	(working copy)
    @@ -217,20 +217,22 @@
     			// make old texture lowercase
     			strlwr(texture_file);
     
    -			// now add it to the box
    -			z = box->AddString(texture_file);
    -
    -			// and add it to the field as well
    +			// add it to the field
     			strcpy_s(old_texture_name[texture_count], texture_file);
     
     			// increment
     			texture_count++;
    -
    -			// sort
    -			sort_textures();
     		}
     	}
     
    +	// now sort the filenames
    +	sort_textures();
    +
    +	// and add them to the box
    +	for (i=0; i<texture_count; i++) {
    +		z = box->AddString(old_texture_name[i]);
    +	}
    +
     	// now look for new textures
     	for (SCP_vector<texture_replace>::iterator ii = Fred_texture_replacements.begin(); ii != Fred_texture_replacements.end(); ++ii)
     	{
    
    patch file icon 3145.patch (1,528 bytes) 2015-02-22 16:55 +

-Relationships
duplicate of 0001929resolvedMageKing17 Texture replacement more problems 
+Relationships

-Notes

~0016506

MageKing17 (developer)

I think this may be due to different sorting behavior between CBS_SORT and stricmp(). I've attached a patch that should unify the sorting behavior.

~0016507

MageKing17 (developer)

Closing as a duplicate of 1929.
+Notes

-Issue History
Date Modified Username Field Change
2015-02-21 15:23 Axem New Issue
2015-02-21 15:23 Axem File Added: texturereplacebroken.png
2015-02-22 16:55 MageKing17 File Added: 3145.patch
2015-02-22 16:56 MageKing17 Note Added: 0016506
2015-02-22 16:56 MageKing17 Assigned To => MageKing17
2015-02-22 16:56 MageKing17 Status new => code review
2015-02-22 17:29 MageKing17 Relationship added duplicate of 0001929
2015-02-22 18:11 MageKing17 Note Added: 0016507
2015-02-22 18:11 MageKing17 Assigned To MageKing17 =>
2015-02-22 18:11 MageKing17 Status code review => closed
2015-02-22 18:11 MageKing17 Resolution open => duplicate
2015-02-23 22:03 Goober5000 Assigned To => MageKing17
+Issue History