mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
dd87350cb7
See issue #875. In hindsight the reason for this bug is easy to understand. When updating a dive, the dive was first removed from the model, and added in its new state again. This does seems resonable, but the delete in the model causes the internal (QML) state to be changed, and the previous state (like the currentIndex that was pointing to the just deleted row, so that one is changed to something valid internally) is not restored at recreation of the edited dive. The QML engine has no way to understand that the remove and subsequent add are in fact one atomic operation. This can be solved by simply updating the underlying data in place, and notifying the change using a dataChanged emitted signal. The dataChanged signal takes care of the repaint of the screen, and there is no need for removeRow/insertRow pairs. Fixes: #875 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> |
||
---|---|---|
.. | ||
cleanertablemodel.cpp | ||
cleanertablemodel.h | ||
CMakeLists.txt | ||
completionmodels.cpp | ||
completionmodels.h | ||
cylindermodel.cpp | ||
cylindermodel.h | ||
divecomputerextradatamodel.cpp | ||
divecomputerextradatamodel.h | ||
divecomputermodel.cpp | ||
divecomputermodel.h | ||
diveimportedmodel.cpp | ||
diveimportedmodel.h | ||
divelistmodel.cpp | ||
divelistmodel.h | ||
divelocationmodel.cpp | ||
divelocationmodel.h | ||
divepicturemodel.cpp | ||
divepicturemodel.h | ||
diveplannermodel.cpp | ||
diveplannermodel.h | ||
diveplotdatamodel.cpp | ||
diveplotdatamodel.h | ||
divetripmodel.cpp | ||
divetripmodel.h | ||
filtermodels.cpp | ||
filtermodels.h | ||
gpslistmodel.cpp | ||
gpslistmodel.h | ||
maplocationmodel.cpp | ||
maplocationmodel.h | ||
messagehandlermodel.cpp | ||
messagehandlermodel.h | ||
models.cpp | ||
models.h | ||
ssrfsortfilterproxymodel.cpp | ||
ssrfsortfilterproxymodel.h | ||
tankinfomodel.cpp | ||
tankinfomodel.h | ||
treemodel.cpp | ||
treemodel.h | ||
weightmodel.cpp | ||
weightmodel.h | ||
weigthsysteminfomodel.cpp | ||
weigthsysteminfomodel.h | ||
yearlystatisticsmodel.cpp | ||
yearlystatisticsmodel.h |