Skip to content

Commit

Permalink
Fix display bug after edit
Browse files Browse the repository at this point in the history
  • Loading branch information
potaotototo committed Oct 24, 2024
1 parent 567e8f6 commit e611f86
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/tuteez/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public CommandResult execute(Model model) throws CommandException {
}

model.setPerson(personToEdit, editedPerson);
if (personToEdit.equals(model.getLastViewedPerson().get().get())) {
model.updateLastViewedPerson(editedPerson);
String logMessageForPerson =
String.format("Student on display is edited, After Edit - Student: %s", editedPerson);
logger.info(logMessageForPerson);
}
model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
String logMessage = String.format("Before Edit - Student: %s%nAfter Edit - Student: %s",
personToEdit, editedPerson);
Expand Down

0 comments on commit e611f86

Please sign in to comment.