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>
This commit is contained in:
Tomaz Canabrava 2013-07-18 11:53:47 -03:00 committed by Dirk Hohndel
parent 7e029980b8
commit 3aa55462dc
4 changed files with 33 additions and 3 deletions

View file

@ -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) {