mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: implement purge of unused dive sites
Add a "purge unused dive sites" button to the dive site list. Connect it to a new PurgeUnusedDiveSites command. Implementation was trivial: simply copy the DeleteDiveSites command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
fde80eeaa5
commit
8858bfa1f8
7 changed files with 59 additions and 0 deletions
|
@ -43,6 +43,21 @@ private:
|
|||
std::vector<OwningDiveSitePtr> sitesToAdd;
|
||||
};
|
||||
|
||||
class PurgeUnusedDiveSites : public Base {
|
||||
public:
|
||||
PurgeUnusedDiveSites();
|
||||
private:
|
||||
bool workToBeDone() override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// For redo
|
||||
std::vector<dive_site *> sitesToRemove;
|
||||
|
||||
// For undo
|
||||
std::vector<OwningDiveSitePtr> sitesToAdd;
|
||||
};
|
||||
|
||||
class EditDiveSiteName : public Base {
|
||||
public:
|
||||
EditDiveSiteName(dive_site *ds, const QString &name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue