From 56c58bdd24451352e1f2a538c145f865b2546ac2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 22 May 2013 10:02:28 -0700 Subject: Actually remove cylinders and weightsystems from the data structures The UI had only stubbed this code out. This adds the implementation of the helpers and calls them. Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qt-ui/models.cpp') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 360058dfd..ee1ae78ac 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -6,6 +6,7 @@ */ #include "models.h" #include "../helpers.h" +#include "../dive.h" #include #include #include @@ -226,7 +227,9 @@ void CylindersModel::remove(const QModelIndex& index) return; } beginRemoveRows(QModelIndex(), index.row(), index.row()); // yah, know, ugly. - // Remove code should be here. + rows--; + remove_cylinder(current, index.row()); + mark_divelist_changed(TRUE); endRemoveRows(); } @@ -236,7 +239,9 @@ void WeightModel::remove(const QModelIndex& index) return; } beginRemoveRows(QModelIndex(), index.row(), index.row()); // yah, know, ugly. - // Remove code should be here. + rows--; + remove_weightsystem(current, index.row()); + mark_divelist_changed(TRUE); endRemoveRows(); } -- cgit v1.2.3-70-g09d2