mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:16:16 +00:00
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>
This commit is contained in:
parent
9c90d6790a
commit
9f8577a5ea
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue