Skip to content

Commit

Permalink
Ensure sheet is synced when certain fields are modified
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwilkes committed Sep 18, 2020
1 parent 7a59364 commit 89bc73a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,12 @@ public void handleNotification(Object producer, String type, Object data) {
markForRebuild();
} else if (type.startsWith(Skill.PREFIX)) {
OutlineSyncer.add(getSkillOutline());
mSyncWeapons = true;
markForRebuild();
} else if (type.startsWith(Spell.PREFIX)) {
OutlineSyncer.add(getSpellOutline());
mSyncWeapons = true;
markForRebuild();
} else if (type.startsWith(Equipment.PREFIX)) {
OutlineSyncer.add(getEquipmentOutline());
OutlineSyncer.add(getOtherEquipmentOutline());
Expand All @@ -704,6 +708,7 @@ public void handleNotification(Object producer, String type, Object data) {
markForRebuild();
} else if (type.startsWith(Note.PREFIX)) {
OutlineSyncer.add(getNoteOutline());
markForRebuild();
}

if (MARK_FOR_WEAPON_REBUILD_NOTIFICATIONS.contains(type)) {
Expand All @@ -712,6 +717,7 @@ public void handleNotification(Object producer, String type, Object data) {
} else if (GURPSCharacter.ID_PARRY_BONUS.equals(type) || Skill.ID_LEVEL.equals(type)) {
OutlineSyncer.add(mMeleeWeaponOutline);
OutlineSyncer.add(mRangedWeaponOutline);
markForRebuild();
} else if (GURPSCharacter.ID_CARRIED_WEIGHT.equals(type) || GURPSCharacter.ID_CARRIED_WEALTH.equals(type)) {
Column column = getEquipmentOutline().getModel().getColumnWithID(EquipmentColumn.DESCRIPTION.ordinal());
column.setName(EquipmentColumn.DESCRIPTION.toString(mCharacter, true));
Expand Down

0 comments on commit 89bc73a

Please sign in to comment.