Undo: implement undo of geo lookup

Simply copy code of the other edit dive site functions. Here though
introduce a destructor in the undo command to free the taxonomy data.

Remove the taxonomy member of the LocationInformationWidget class,
because it is not needed anymore.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-03-15 14:32:55 +01:00 committed by Dirk Hohndel
parent b5d4d88fe5
commit 7c63956ee4
6 changed files with 57 additions and 9 deletions

View file

@ -104,6 +104,19 @@ private:
location_t value; // Value to be set
};
class EditDiveSiteTaxonomy : public Base {
public:
EditDiveSiteTaxonomy(dive_site *ds, taxonomy_data &taxonomy);
~EditDiveSiteTaxonomy(); // free taxonomy
private:
bool workToBeDone() override;
void undo() override;
void redo() override;
dive_site *ds;
taxonomy_data value; // Value to be set
};
} // namespace Command
#endif // COMMAND_DIVESITE_H