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)
{