mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: implement undo of dive site description editing
Simply duplicate the code of dive site name editing. Split out the common functionality that swaps a C and a Qt string. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0fd85832b7
commit
2dcc0a7d1e
6 changed files with 58 additions and 4 deletions
|
@ -38,6 +38,18 @@ private:
|
|||
QString value; // Value to be set
|
||||
};
|
||||
|
||||
class EditDiveSiteDescription : public Base {
|
||||
public:
|
||||
EditDiveSiteDescription(dive_site *ds, const QString &description);
|
||||
private:
|
||||
bool workToBeDone() override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
dive_site *ds;
|
||||
QString value; // Value to be set
|
||||
};
|
||||
|
||||
} // namespace Command
|
||||
|
||||
#endif // COMMAND_DIVESITE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue