mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: replace model-reset by row-addition in DiveListModel::reload()
Owing to apparent QML breakage, a model-reset leads to the DiveDetail page being reloaded for every dive in the list(!). Therefore, add rows instead. This leads to extremely subtle code, as it is now imperative that the model has been properly cleared beforehand. Nevertheless, for now we have to do this to fix a severe performance regression. Fixes #2295 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
649ac1f83a
commit
eecca6aab0
3 changed files with 13 additions and 5 deletions
|
@ -391,7 +391,7 @@ Kirigami.Page {
|
|||
manager.appendTextToLog("Save downloaded dives that were selected")
|
||||
importModel.recordDives()
|
||||
manager.saveChangesLocal()
|
||||
diveModel.reload()
|
||||
diveModel.resetInternaData()
|
||||
pageStack.pop();
|
||||
download.text = qsTr("Download")
|
||||
divesDownloaded = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue