From 2c14f3aa3b44ef9475e5b38acb8bbaa029e662be Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 25 Sep 2013 14:23:51 -0300 Subject: 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 --- qt-ui/models.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui/models.h') diff --git a/qt-ui/models.h b/qt-ui/models.h index c60856478..2a9945aeb 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -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); -- cgit v1.2.3-70-g09d2