mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: make dive site merging undoable
This one was rather trivial, as there is no actual merging done. Quite simply, a number of dive sites are removed and their dive added to a different dive site. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7c63956ee4
commit
59239cec02
7 changed files with 66 additions and 36 deletions
|
@ -117,6 +117,23 @@ private:
|
|||
taxonomy_data value; // Value to be set
|
||||
};
|
||||
|
||||
class MergeDiveSites : public Base {
|
||||
public:
|
||||
MergeDiveSites(dive_site *ds, const QVector<dive_site *> &sites);
|
||||
private:
|
||||
bool workToBeDone() override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
dive_site *ds;
|
||||
|
||||
// For redo
|
||||
std::vector<dive_site *> sitesToRemove;
|
||||
|
||||
// For undo
|
||||
std::vector<OwningDiveSitePtr> sitesToAdd;
|
||||
};
|
||||
|
||||
} // namespace Command
|
||||
|
||||
#endif // COMMAND_DIVESITE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue