mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-03 15:43:09 +00:00
152e6966c9
The copy/pasting of dive-sites was fundamentally broken in at least two ways: 1) The dive-site pointer in struct dive was simply overwritten, which breaks internal consistency. Also, no dive-site changed signals where sent. 2) The copied dive-site was stored as a pointer in a struct dive. Thus, the user could copy a dive, then delete the dive-site and paste. This would lead to a dangling pointer and ultimately crash the application. Fix this by storing the UUID of the dive-site, not a pointer. To do that, don't store a copy of the dive, but collect all the data in a `dive_paste_data` structure. If the dive site has been deleted on paste, do nothing. Send the appropriate signals on pasting. The mobile version had an additional bug: It kept a pointer to the dive to be copied, which might become stale by undo. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
icons | ||
About.qml | ||
CloudCredentials.qml | ||
CopySettings.qml | ||
DeleteAccount.qml | ||
DiveDetails.qml | ||
DiveDetailsEdit.qml | ||
DiveDetailsView.qml | ||
DiveList.qml | ||
DivePlannerEdit.qml | ||
DivePlannerManager.qml | ||
DivePlannerSetup.qml | ||
DivePlannerView.qml | ||
DiveSummary.qml | ||
DownloadedDiveDelegate.qml | ||
DownloadFromDiveComputer.qml | ||
Export.qml | ||
HintsTextEdit.qml | ||
Log.qml | ||
main.qml | ||
MapPage.qml | ||
mobile-resources.qrc | ||
qmldir | ||
qtquickcontrols2.conf | ||
RecoverCache.qml | ||
Settings.qml | ||
SsrfSwitch.qml | ||
SsrfTextField.qml | ||
StartPage.qml | ||
StatisticsPage.qml | ||
TemplateButton.qml | ||
TemplateCheckBox.qml | ||
TemplateComboBox.qml | ||
TemplateEditComboBox.qml | ||
TemplateLabel.qml | ||
TemplateLabelSmall.qml | ||
TemplateLine.qml | ||
TemplatePage.qml | ||
TemplateRadioButton.qml | ||
TemplateSection.qml | ||
TemplateSlimComboBox.qml | ||
TemplateSpinBox.qml | ||
TemplateTextField.qml | ||
TemplateTitle.qml | ||
ThemeTest.qml | ||
TripDetails.qml |