mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove EDIT_TEXT and EDIT_VALUE macros in maintab.cpp
These functions are now performed by the edit commands and the macros have no users. Remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
92e6e2bba1
commit
73a230b6e6
7 changed files with 215 additions and 62 deletions
|
@ -211,6 +211,38 @@ public:
|
|||
DiveField fieldId() const override;
|
||||
};
|
||||
|
||||
// Fields we have to remember to undo paste
|
||||
struct PasteState {
|
||||
dive *d;
|
||||
dive_site *divesite;
|
||||
QString notes;
|
||||
QString divemaster;
|
||||
QString buddy;
|
||||
QString suit;
|
||||
int rating;
|
||||
int visibility;
|
||||
tag_entry *tags;
|
||||
cylinder_t cylinders[MAX_CYLINDERS];
|
||||
weightsystem_t weightsystems[MAX_WEIGHTSYSTEMS];
|
||||
|
||||
PasteState(dive *d, const dive *data, dive_components what); // Read data from dive data for dive d
|
||||
~PasteState();
|
||||
void swap(dive_components what); // Exchange values here and in dive
|
||||
};
|
||||
|
||||
class PasteDives : public Base {
|
||||
dive_components what;
|
||||
std::vector<PasteState> dives;
|
||||
std::vector<OwningDiveSitePtr> ownedDiveSites;
|
||||
dive *current;
|
||||
public:
|
||||
PasteDives(const dive *d, dive_components what);
|
||||
private:
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
bool workToBeDone() override;
|
||||
};
|
||||
|
||||
} // namespace Command
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue