summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-07-18 11:53:47 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-07-18 11:53:47 -0300
commitedb1a7adb37639d50b2dc1672adde20d544211c1 (patch)
tree64c37379092c1acb8b457bffe35530ddf4930558 /qt-ui/models.cpp
parent9b0a44196c1f619b37450ef77d00aedfdad106ae (diff)
downloadsubsurface-edb1a7adb37639d50b2dc1672adde20d544211c1.tar.gz
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 <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp5
1 files changed, 5 insertions, 0 deletions
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 &current->weightsystem[index.row()];
+}
+
void WeightModel::remove(const QModelIndex& index)
{
if (index.column() != REMOVE) {