mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
d6bee060af
commit
56c58bdd24
3 changed files with 34 additions and 8 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
#include "models.h"
|
||||
#include "../helpers.h"
|
||||
#include "../dive.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QColor>
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue