From 5d2d85abc8862a3ecc717ef8672fd304520a53b6 Mon Sep 17 00:00:00 2001 From: Ezekiel Date: Mon, 11 Apr 2022 19:35:30 +0800 Subject: [PATCH] Fix bug where adding new images was not reflected --- src/main/java/seedu/address/logic/commands/AddImageCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/seedu/address/logic/commands/AddImageCommand.java b/src/main/java/seedu/address/logic/commands/AddImageCommand.java index 732fede0ce1..8c8b229c960 100644 --- a/src/main/java/seedu/address/logic/commands/AddImageCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddImageCommand.java @@ -95,6 +95,7 @@ public CommandResult execute(Model model) throws CommandException { Person editedPerson = addImages(personToEdit, imagesToAdd); model.setPerson(personToEdit, editedPerson); model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); + model.setImagesToView(editedPerson.getImageDetailsList()); resultStringBuilder.append(String.format(ADD_IMAGE_SUCCESS, imagesToAdd.size(), editedPerson)); return new CommandResult(resultStringBuilder.toString(), VIEW_IMAGES);