diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-13 15:49:26 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-14 21:24:48 +0900 |
commit | 9f8577a5ea42b62808dcf3c14daa3c7ea9548961 (patch) | |
tree | b6cf4dd238385c5e5873fc28a97080f1d7d944a1 /qt-ui/models.cpp | |
parent | 9c90d6790a9cb38521beaedaffd1e847784b4088 (diff) | |
download | subsurface-9f8577a5ea42b62808dcf3c14daa3c7ea9548961.tar.gz |
Fix edition of alphanumeric input on equipments.
This patch fixes the edition of alphanumeric input,
columns like depth accepted '23ft', '20m' or '30', with
an inplicit conversion to the unit. But the code ignored
that the input could have a 'ft' or 'm' ( ot anything else
for that matter.
Signed-off-by: Taiane Ramos <exhora.tat@gmail.com>
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 51faa0670..dcc16d8d6 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -195,7 +195,9 @@ void CylindersModel::passInData(const QModelIndex& index, const QVariant& value) } } -#define CHANGED(_t,_u1,_u2) value._t() != data(index, role).toString().remove(_u1).remove(_u2)._t() +#define CHANGED(_t,_u1,_u2) \ + value.toString().remove(_u1).remove(_u2)._t() != \ + data(index, role).toString().remove(_u1).remove(_u2)._t() bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, int role) { |