Skip to content

Commit e05bf3c

Browse files
authored
Make sure we actually set old_class when changing classes (#7221)
1 parent 125377f commit e05bf3c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

code/lab/dialogs/lab_ui.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,10 @@ static void build_ship_table_info_txtbox(ship_info* sip)
654654
static SCP_string table_text;
655655
static int old_class = getLabManager()->CurrentClass;
656656

657-
if (table_text.length() == 0 || old_class != getLabManager()->CurrentClass)
657+
if (table_text.length() == 0 || old_class != getLabManager()->CurrentClass) {
658658
table_text = get_ship_table_text(sip);
659+
old_class = getLabManager()->CurrentClass;
660+
}
659661

660662
InputTextMultiline("##table_text",
661663
const_cast<char*>(table_text.c_str()),
@@ -675,6 +677,7 @@ static void build_weapon_table_info_txtbox(weapon_info* wip)
675677

676678
if (table_text.length() == 0 || old_class != getLabManager()->CurrentClass) {
677679
table_text = get_weapon_table_text(wip);
680+
old_class = getLabManager()->CurrentClass;
678681
}
679682

680683
InputTextMultiline("##weapon_table_text",

0 commit comments

Comments
 (0)