From 3aa55462dc2fc44151962a292f9b7034ec3863b2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 18 Jul 2013 11:53:47 -0300 Subject: Added the code to revert Weigths when user cancels edition This is a follow up commit to the previous one that enabled cancel for cylinders, everything in the commit log for the cylinders also applyes here. Signed-off-by: Tomaz Canabrava --- qt-ui/models.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui/models.cpp') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index fe15a98c3..347301424 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -348,6 +348,11 @@ WeightModel::WeightModel(QObject* parent): QAbstractTableModel(parent), current( { } +weightsystem_t* WeightModel::weightSystemAt(const QModelIndex& index) +{ + return ¤t->weightsystem[index.row()]; +} + void WeightModel::remove(const QModelIndex& index) { if (index.column() != REMOVE) { -- cgit v1.2.3-70-g09d2