From 3c786e35c3ca614ab16141b3f0ad4a03a0bcba2b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 19 Dec 2020 11:59:32 +0100 Subject: [PATCH] undo: fix annoying warning message when deleting pictures The RemovePictures command filters the pictures provided by the UI: only actually existing pictures are removed. The code was buggy: the original list was copied and then the filtered list was added. Thus, every picture was listed twice leading to annoying warning messages. Remove the copy. Signed-off-by: Berthold Stoeger --- commands/command_pictures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/command_pictures.cpp b/commands/command_pictures.cpp index 2d57221fb..9a17ca9bf 100644 --- a/commands/command_pictures.cpp +++ b/commands/command_pictures.cpp @@ -119,7 +119,7 @@ static std::vector addPictures(std::vector &pictures) : picturesToRemove(pictures) +RemovePictures::RemovePictures(const std::vector &pictures) { // Filter out the pictures that don't actually exist. In principle this shouldn't be necessary. // Nevertheless, let's play it save. This has the additional benefit of sorting the pictures