subsurface/mobile-widgets/qml
Berthold Stoeger 152e6966c9 fix copy/paste of dive-site
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>
2024-08-17 23:34:16 +12:00
..
icons Mobile: Add 'Contribute' link. 2024-02-06 23:40:58 +13:00
About.qml update copyright year and version details 2024-01-07 16:01:55 -08:00
CloudCredentials.qml Mobile: Fix Cloud Synch Status Management. 2024-02-12 16:47:46 -08:00
CopySettings.qml fix copy/paste of dive-site 2024-08-17 23:34:16 +12:00
DeleteAccount.qml mobile: add ability to delete cloud account 2022-08-13 14:08:37 -07:00
DiveDetails.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
DiveDetailsEdit.qml core: replace dive master by dive guide 2022-02-15 09:35:43 -08:00
DiveDetailsView.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
DiveList.qml mobile/UI: show result of manual sync 2021-01-23 13:19:11 -08:00
DivePlannerEdit.qml
DivePlannerManager.qml
DivePlannerSetup.qml Mobile: Fix Gradient Factor Preference Setting. 2024-01-27 20:55:32 -08:00
DivePlannerView.qml
DiveSummary.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
DownloadedDiveDelegate.qml mobile/UI: consolidate to a single check box 2021-01-01 11:35:39 -08:00
DownloadFromDiveComputer.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
Export.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
HintsTextEdit.qml
Log.qml
main.qml mobile: show incorrect cloud password state 2024-02-23 20:12:12 -08:00
MapPage.qml
mobile-resources.qrc Mobile: Add 'Contribute' link. 2024-02-06 23:40:58 +13:00
qmldir
qtquickcontrols2.conf
RecoverCache.qml
Settings.qml Mobile: Add Input Validation and Conversion for Gradient Factors. 2024-02-17 12:36:15 +13:00
SsrfSwitch.qml
SsrfTextField.qml cleanup: fix typo: verboseEnabebled -> verboseEnabled 2023-05-20 20:07:22 +02:00
StartPage.qml Mobile: Add Warning About Delay for Initial Synch. 2023-12-11 23:17:14 +13:00
StatisticsPage.qml Mobile: Fix QML Warnings. 2024-06-06 16:17:32 +12:00
TemplateButton.qml mobile/UI: offer more font sizes 2021-01-19 12:35:29 -08:00
TemplateCheckBox.qml mobile/UI: consolidate to a single check box 2021-01-01 11:35:39 -08:00
TemplateComboBox.qml mobile/UI: improve layout of styled ComboBox and TextField 2021-01-19 12:35:29 -08:00
TemplateEditComboBox.qml mobile/UI: add template for editable combo box 2021-01-01 11:35:39 -08:00
TemplateLabel.qml
TemplateLabelSmall.qml mobile: tweak line spacing 2021-08-18 19:09:59 -07:00
TemplateLine.qml
TemplatePage.qml
TemplateRadioButton.qml mobile UI: style check boxes and radio boxes 2020-12-20 10:51:18 -08:00
TemplateSection.qml
TemplateSlimComboBox.qml mobile/UI: improve layout of styled ComboBox and TextField 2021-01-19 12:35:29 -08:00
TemplateSpinBox.qml Mobile: improve GFLow/High settings UI 2024-02-14 18:57:41 +13:00
TemplateTextField.qml
TemplateTitle.qml
ThemeTest.qml mobile/cleanup: make theme test page work in dark mode 2021-01-19 12:42:48 -08:00
TripDetails.qml mobile/UI: initialize Kirigami theme to use our colors 2020-12-23 09:44:39 -08:00