subsurface/dives
Berthold Stoeger 846e1ba53e core: always create a fake profile if there are no samples
Before making the cylinder-table dynamic, dives always
had at least one cylinger. When such a dive is displayed,
the TabDiveInformation class calls per_cylinder_mean_depth().
If there are no samples, this function generates a "fake
profile" with fake_dc(). Thus, effectively dives always
had samples once the user was displaying them.

When the cylinder-table was made dynamic, dives without
cylinders were supported. This can notably happen, when
importing from CSV (this could actually be a bug).
per_cylinder_mean_depth() exits early in that case and
doesn't create a fake profile. This lead to crashes
of the profile-widget, which were fixed in 6b2e56e513.
Non-sample dives were now shown with the Subsurface-logo.

To restore the previous behavior, genarate a fake profile
for sample-less dives in fixup_dive(), which is called
anytime  a dive is loaded or imported. This seems to
have been the intention anyway and this worked only
"by chance". This will make a few fake_dc() calls obsolete,
but so be it.

Since fake profiles are now generated on loading,
the parse-tests need to be fixed to account for that.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-07-23 11:30:17 -07:00
..
images Test for adding a picture with data after JFIF EOI to a dive 2017-05-06 10:31:09 -07:00
abitofeverything.ssrf Add test for profile data 2020-05-04 13:39:18 -07:00
Demo_SmartTrak.slg SmartTrak import - Add example divelog file 2015-11-12 07:39:21 -08:00
Dive_2013-02-02-1614.xml
DL7.xml cleanup: move clearing of device nodes to clear_dive_file_data() 2020-04-24 10:40:12 -07:00
DL7.zxu Add two dive headers to DL7 sample 2018-01-08 06:06:12 +02:00
Example.log
exportprofilereference.csv Add test for profile in VPMB mode 2021-03-24 10:30:22 -07:00
exportprofilereferenceVPMB.csv Add test for profile in VPMB mode 2021-03-24 10:30:22 -07:00
gps-import.gpx Desktop: Import gps coordinates: test files 2020-01-24 09:51:51 -08:00
gps-import.xml Desktop: Import gps coordinates: test files 2020-01-24 09:51:51 -08:00
mergedVyperOstc.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
ostc.xml Add test for merging multiple cylinders 2017-02-09 22:22:12 -08:00
ostc_00087_04-05-2014_043m_032min.dive
ostc_00173_17-08-2013_027m_043min.dive
Poseidon_MkVILog.csv
Poseidon_MkVILog.txt
sac-test.xml
SampleDivesV2.ssrf
tank_pressure.xml
Test.csv Correct celcius/celsius typo in test dives 2020-02-09 14:41:43 -08:00
test0.xml Fix Qt date interfaces for times before 1970 2016-04-29 09:07:41 -07:00
test0b.xml
test1.xml
test2.xml
test3.xml
test4.xml
test5.xml
test6.xml
test7.xml
test8.xml
test9.xml
test9a.xml
test10.xml
test11.xml
test12.xml
test13.xml
test14.xml
test15.xml
test16.xml
test17.xml
test18.xml
test19.xml
test20.xml
test21.xml
test22.xml
test23.xml
test24.xml
test25.xml
test26.xml
test27.xml
test28.xml
test29.xml
test30.xml
test31.xml
test32.xml
test33.xml
test34.xml
test35.xml
test36.xml
test38.xml
test40-42.xml core: always create a fake profile if there are no samples 2021-07-23 11:30:17 -07:00
test40.xml
test41.csv
test42.xml
test43.xml
test44.xml Test for basic image handling 2017-02-21 13:14:56 -08:00
test47+48.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
test47.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
test47b.xml Add missing XML files for TestRenumber 2015-10-06 14:40:33 +01:00
test47c.xml Add missing XML files for TestRenumber 2015-10-06 14:40:33 +01:00
test48+47.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
test48.xml Dive site: fix merging tests 2019-04-12 18:19:07 +03:00
test50.xml
test51.xml Fixed get_gas_at_time for equal times 2018-10-30 15:33:43 +01:00
TestAPDLogViewer.csv Correct celcius/celsius typo in test dives 2020-02-09 14:41:43 -08:00
TestAtmPress.xml Convert the atmospheric pressure in the Information Tab to an editable field 2019-05-15 07:37:14 -07:00
TestComma.csv Correct celcius/celsius typo in test dives 2020-02-09 14:41:43 -08:00
TestDiveDivelogsDE.DLD
TestDiveDivelogsDE.udcf
TestDiveDivelogsDE.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
TestDiveDivingLog5.08.udcf
TestDiveDivingLog5.08.uddf
TestDiveDivingLog5.08allimperial.xml
TestDiveDivingLog5.08allmetric.xml
TestDiveDivingLog5.08allmetric.zip
TestDiveDM3.SDE
TestDiveDM4.db
TestDiveDM4.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
TestDiveDM5.db Test dives in DM5 database format 2017-11-27 13:42:10 -08:00
TestDiveDM5.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
TestDiveJDiveLog.jlb
TestDiveSeabearH3_0002SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearH3_0003SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearH3_0004SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearH3_0005SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearHUDC.csv
TestDiveSeabearHUDC.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
TestDiveSeabearNewFormat.xml Fix pO2 for CCR at shallow depths 2021-02-26 08:42:30 -08:00
TestDiveSeabearT1_0001SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearT1_0002SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearT1_0003SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearT1_0004SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeabearT1_0005SBDT.CSV Test dives for Seabear new format 2015-07-28 08:46:51 -07:00
TestDiveSeacSync.db Implement Seac SeacSync databaser parser. 2020-09-04 15:54:08 +03:00
TestDivingLog4.1.1.sql Divinglog test dive 2015-07-13 15:21:30 -07:00
TestSensusSingle.csv
TestXP5_de.csv
TwoTimesTwo.ssrf Add test for dive site duplication bug 2015-08-30 10:32:38 -07:00
vyper.xml Add test for merging multiple cylinders 2017-02-09 22:22:12 -08:00