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 mobile-widgets/qml: use Kirigami Units instead of hardcoded values 2020-01-24 20:20:41 -08:00
DivePlannerManager.qml mobile-widgets/qml: use Kirigami Units instead of hardcoded values 2020-01-24 20:20:41 -08:00
DivePlannerSetup.qml Mobile: Fix Gradient Factor Preference Setting. 2024-01-27 20:55:32 -08:00
DivePlannerView.qml mobile-widgets/qml: use Kirigami Units instead of hardcoded values 2020-01-24 20:20:41 -08:00
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 Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
Log.qml mobile-widgets/qml: columnWidth undefined 2020-01-18 12:44:05 -08:00
main.qml mobile: show incorrect cloud password state 2024-02-23 20:12:12 -08:00
MapPage.qml Mobile: don't make sub-pages fill the parent 2019-10-13 11:32:27 -07:00
mobile-resources.qrc Mobile: Add 'Contribute' link. 2024-02-06 23:40:58 +13:00
qmldir mobile-widgets/qml: add qmldir to include map-widget 2019-11-26 09:44:13 -08:00
qtquickcontrols2.conf QML UI: Fully port dive edit to Kirigami2 2017-04-01 09:35:51 +02:00
RecoverCache.qml mobile: add option to merge local cloud cache data 2020-06-07 19:47:52 -07:00
Settings.qml Mobile: Add Input Validation and Conversion for Gradient Factors. 2024-02-17 12:36:15 +13:00
SsrfSwitch.qml Mobile UI: make SsrfSwitch resizable 2018-10-21 14:43:41 -04:00
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 mobile: reduce vertical white space around labels 2020-05-14 12:57:08 -07:00
TemplateLabelSmall.qml mobile: tweak line spacing 2021-08-18 19:09:59 -07:00
TemplateLine.qml mobile-widgets/qml: add TemplateLine 2020-01-19 11:50:19 -08:00
TemplatePage.qml mobile UI: set correct width for TeplatePage 2020-02-06 21:45:00 -08:00
TemplateRadioButton.qml mobile UI: style check boxes and radio boxes 2020-12-20 10:51:18 -08:00
TemplateSection.qml mobile-widgets: update design of TemplateSection 2020-01-25 17:25:54 -08:00
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 mobile-widgets/qml: add TemplateTextField 2020-01-19 11:50:10 -08:00
TemplateTitle.qml mobile-widgets/qml: correct spelling error 2020-01-27 14:25:03 -08:00
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