Skip to content

Commit f9668ec

Browse files
committed
Refresh structure combo on title change
The structure combo only refreshed via the gender-toggle listener. Switching titles within the same gender bucket left the toggle's selected value unchanged, so onGenderChanged never fired and the combo kept the previous title's rules even though the underlying catalog had moved on.
1 parent cdbe72c commit f9668ec

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

code/src/java/pcgen/gui3/namegen/RandomNamePanelController.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ private void onTitleChanged(String title)
157157
String previous = currentGender();
158158
String target = chooseStickyGender(available, previous);
159159
selectGender(target);
160+
// If the sticky gender is unchanged, the toggle listener won't fire,
161+
// so refresh the structure combo here too — the catalog is keyed on
162+
// (category, title, gender) and title just changed.
163+
refreshStructureCombo();
160164
}
161165

162166
private void onGenderChanged(Toggle selected)

0 commit comments

Comments
 (0)