aboutsummaryrefslogtreecommitdiffstats
path: root/commands/command_pictures.cpp
AgeCommit message (Collapse)Author
2020-12-19undo: fix annoying warning message when deleting picturesGravatar Berthold Stoeger
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>
2020-12-19undo: add \n to console warning error messagesGravatar Berthold Stoeger
To make the output more readable. Moreover, fix a comment-typo. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-08media: give newly created dive sites a nameGravatar Berthold Stoeger
When adding a picture with GPS information, a dive site was added if the dive didn't have any. The dive site had the empty string as name, leading to a confusing UI experience. We could catch the empty string at numerous places and replace it by some dummy string. This commit goes the distinctly less invasive route and adds the dive site with the "unnamed dive site" string (translated to the user language) as name. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-06undo: make adding of pictures undoableGravatar Berthold Stoeger
This one is a bit hairy, because two things might happen if the picture has a geo location: - A dive gets a newly generated dive site set. - The dive site of a dive is edited. Therefore the undo command has to store keep track of that. Oh my. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-06undo: make picture (media) deletion undoableGravatar Berthold Stoeger
The code is rather complex. Firstly, we have different representations of pictures throughout the code. Secondly, this tries to do add the pictures in batches to the divepicture model and that is always rather tricky. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-06undo: implement undo of setting a picture time by drag&dropGravatar Berthold Stoeger
Even though the functionality is seemingly trivial, this is a bit invasive, as the code has to be split into two distinct parts: 1) Post undo command 2) React to changes to the divelist Don't compile that code on mobile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>