Added a 'changed' member on Cylinder/Weigth models to know when to Apply a change.

Added a 'changed' member on Cylinders and weigth models to mark when
one was changed or not. Only the changed data should be inserted on
the selected dives, so if the user changes the cylinders on a multi
edit, there's no need ( and it will actually break things if we did that )
set the weigths too.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-09-25 14:23:51 -03:00
parent c805e2c941
commit 2c14f3aa3b
2 changed files with 18 additions and 0 deletions

View file

@ -86,6 +86,7 @@ public:
void update();
void setDive(struct dive *d);
cylinder_t *cylinderAt(const QModelIndex& index);
bool changed;
public slots:
void remove(const QModelIndex& index);
@ -116,6 +117,7 @@ public:
void update();
void setDive(struct dive *d);
weightsystem_t *weightSystemAt(const QModelIndex& index);
bool changed;
public slots:
void remove(const QModelIndex& index);