diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divelistmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index a0f181405..ba99e47bb 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -93,8 +93,8 @@ void DiveListModel::removeDiveById(int id) void DiveListModel::updateDive(int i, dive *d) { DiveObjectHelper *newDive = new DiveObjectHelper(d); - removeDive(i); - insertDive(i, newDive); + m_dives.replace(i, newDive); + emit dataChanged(createIndex(i, 0), createIndex(i, 0)); } void DiveListModel::clear() |