mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: make adding of weights an undoable action
Introduce an AddWeight undo command. This is modelled after the numerous dive-edit undo commands. The redo and undo actions are connected to the WeightModel via two new signals, weightAdded and weightRemoved. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
76a5a38f5e
commit
147a36647c
8 changed files with 76 additions and 14 deletions
|
|
@ -23,7 +23,6 @@ public:
|
|||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
void passInData(const QModelIndex &index, const QVariant &value);
|
||||
void add();
|
||||
void clear();
|
||||
void updateDive(dive *d);
|
||||
weightsystem_t *weightSystemAt(const QModelIndex &index);
|
||||
|
|
@ -33,6 +32,8 @@ public
|
|||
slots:
|
||||
void remove(QModelIndex index);
|
||||
void weightsystemsReset(const QVector<dive *> &dives);
|
||||
void weightAdded(dive *d, int pos);
|
||||
void weightRemoved(dive *d, int pos);
|
||||
|
||||
private:
|
||||
dive *d;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue