diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-19 11:59:32 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2020-12-19 20:19:51 +0100 |
commit | 3c786e35c3ca614ab16141b3f0ad4a03a0bcba2b (patch) | |
tree | e59669c0156badfbfe4458785471ce7892da8fdd /commands | |
parent | 77566fe285fe0fb4ec1ac5a831d1cb27bf159945 (diff) | |
download | subsurface-3c786e35c3ca614ab16141b3f0ad4a03a0bcba2b.tar.gz |
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>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/command_pictures.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<PictureListForDeletion> addPictures(std::vector<PictureListFo 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. // Nevertheless, let's play it save. This has the additional benefit of sorting the pictures |