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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-12-19 11:59:32 +01:00 committed by bstoeger
parent 77566fe285
commit 3c786e35c3

View file

@ -119,7 +119,7 @@ static std::vector<PictureListForDeletion> addPictures(std::vector<PictureListFo
return res; return res;
} }
RemovePictures::RemovePictures(const std::vector<PictureListForDeletion> &pictures) : picturesToRemove(pictures) RemovePictures::RemovePictures(const std::vector<PictureListForDeletion> &pictures)
{ {
// Filter out the pictures that don't actually exist. In principle this shouldn't be necessary. // 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 // Nevertheless, let's play it save. This has the additional benefit of sorting the pictures