diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | desktop-widgets/modeldelegates.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a56bdb74..8888b1ab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +Desktop: fix creation of new cylinder types (names couldn't be the start of already existing names) Mobile: fix no-cloud to cloud transition Mobile: remove locking of data storage access Mobile: performance improvements for dive list diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp index 2717f37bc..36c22a532 100644 --- a/desktop-widgets/modeldelegates.cpp +++ b/desktop-widgets/modeldelegates.cpp @@ -240,7 +240,7 @@ void TankInfoDelegate::setModelData(QWidget*, QAbstractItemModel*, const QModelI { QAbstractItemModel *mymodel = currCombo.model; TankInfoModel *tanks = TankInfoModel::instance(); - QModelIndexList matches = tanks->match(tanks->index(0, 0), Qt::DisplayRole, currCombo.activeText); + QModelIndexList matches = tanks->match(tanks->index(0, 0), Qt::DisplayRole, currCombo.activeText, 1, Qt::MatchFixedString | Qt::MatchWrap); int row; QString cylinderName = currCombo.activeText; if (matches.isEmpty()) { @@ -336,7 +336,7 @@ void WSInfoDelegate::setModelData(QWidget*, QAbstractItemModel*, const QModelInd { WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model); WSInfoModel *wsim = WSInfoModel::instance(); - QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, currCombo.activeText); + QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, currCombo.activeText, 1, Qt::MatchFixedString | Qt::MatchWrap); int row; if (matches.isEmpty()) { // we need to add this puppy |