aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-07-13Prepare for 4.9 releaseGravatar Dirk Hohndel
Update supported dive computers, README and ReleaseNotes Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13user manual: update the bundled html versionGravatar Dirk Hohndel
And fix the date to say July. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13Fixed filter scrollarea not adjusting to parent heightGravatar Doug Junkins
Changed the Qt Layout for FilterWidget2 to "Lay Out on a Grid" to allow the scrollarea to adjust when the height of FilterWidget2 changes. Fixes issues #2174. Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-07-13Fix special case for temperature in CSV exportGravatar Miika Turkia
The old code took air and water temperatures primarily from dive/divetemperature or secondarily if the previous one didn't have either one of them from divecomputer/temperature. The new code attempts to take first air temperature from dive/divetemperature or diveomputer/temperature and then on a separate run the water temperature from these both. Thus we should be fine if one temperature is in dive/divetemperature and the other in divecomputer/temperature. Fixes #2169 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2019-07-12Updates to user manual (update 3 of 3)Gravatar willemferguson
Replace four images in section 5.2.5 Update text to reflect the undo mechanism. This mostly involved removing obsolete text. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-07-12User manual: updates to undo descriptionGravatar Dirk Hohndel
And some trailing space removal. The text on editing dives hopefully is more accurate and easier to understand. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-12Profile: stop animations on exportGravatar Berthold Stoeger
The plotDive() function had a flag to plot pictures asynchronously. This was used on export. Rename this field to "instant" and disable animations when set. This should make sure that the axes are properly exported. Fixes #2170 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-12Profile: store animation speed in profile objectGravatar Berthold Stoeger
When exporting dive pictures we don't want animations. Therefore, store the animation speed in the profile object to avoid nasty hacks with the preferences. This actually removes such a hack. Pictures and tooltips for now still use the values stored in the preferences, because their animations happen only on user-interactions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-12Profile: add speed parameter to Animation::* functionsGravatar Berthold Stoeger
For now always use the preferences value, so that this is a no-op. This is a preparation for storing the speed in the profile widget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-12Profile: take int instead of bool in DiveEventItem::recalculatePosGravatar Berthold Stoeger
The goal here is to slowly make animation speed a variable of the profile widget, not of the global preferences. Currently the code does some trickeries with setting / unsetting the global animation speed. Start by not taking a bool "instant" but a speed in DiveEventItem::recalculatePos(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-11Desktop: clear notes on empty diveGravatar Berthold Stoeger
If no dive is set, all fields except the note field were cleared. Also clear notes. Fixes #2172 Reported-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-11Thumbnailer: improve error messageGravatar Berthold Stoeger
In the error messages shown when failing to start ffmpeg, instruct the user to set the correct executable in the preferences. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-11Preferences: warn if ffmpeg can't be loadedGravatar Berthold Stoeger
In the preferences widget warn the user when they enter a non-executable path to ffmpeg. Thus they don't have to start thumbnailing just to find out that the path is wrong. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-10Git: handle excess of cylinders or weightsystems gracefullyGravatar Berthold Stoeger
Currently, the git parser happily trashes memory if a git repository contains too many weightsystems or cylinders. This should only happen in testing, but nevertheless try to handle it gracefully and ignore excess cylinders / weightsystems. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-09Desktop: update BT selection when picking remembered dive computerGravatar Dirk Hohndel
When switching to a BT dive computer, the device selection dialog is opened, when switching away from BT, the device address is set. Fixes #2139 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-06Update user manual (2 of 3)Gravatar willemferguson
Small updates and corrections to existing text Replaced four images to reflect the current UI Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-07-06Cleanup: call calculate_max_limits_new() in create_plot_info_new()Gravatar Berthold Stoeger
All callers of create_plot_info_new() called calculate_max_limits_new() a line before. Thus, simply call the latter in the former. This allows us to automatically free the plot data in create_plot_info_new(). The old code overwrote the corresponding field with NULL. As a side-effect, this removes a bogus static variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-06Cleanup: fix memory management of the plot dataGravatar Berthold Stoeger
There was a global variable last_pi_entry_new, which stored the recently allocated plot data. This was freed when new plot data was generated. A very scary proposition: You can never have two plot datas at the same time! But exactly that happens when you export for example subtitles. The only reason why this didn't lead to very crazy behavior is that at least on my Linux machine, the calloc() call would just return the previously freed memory. Fix this mess by removing the global variable and freeing the data in the callers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-06Cleanup: remove unused get_screen_dpi() functionGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-06Cleanup: remove unused declarations from display.hGravatar Berthold Stoeger
A number of declarations were not used anywhere. Remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-05Update translation source stringsGravatar Dirk Hohndel
Remove all the bogus references to older source versions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-05Update translationsGravatar Dirk Hohndel
And update plurals for the en_US version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-04Desktop: reduce minimum vertical sizeGravatar Dirk Hohndel
The Filter widget really needed to be scrollable as it is very tall. Fixes #2152 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-04Merge pull request #2156 from torvalds/masterGravatar Linus Torvalds
Update libdivecomputer to most recent version
2019-07-04Update libdivecomputer to most recent versionGravatar Linus Torvalds
Add some Garmin Descent logging for common error cases, and update with Jef's upstream (fixing tank pressure information for several dive computers and adding support for the new Mares Genius). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-04Cleanup: remove DiveLocationLineEdit::currTypeGravatar Berthold Stoeger
Apparently this field was never used...? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-04Desktop: enable clearing of dive siteGravatar Berthold Stoeger
Clearing dive site did not work for two reasons: 1) We didn't get a signal when editing was finished. 2) When clearing the dive site, the "add new dive site" site was set. Thus, connect to the editingFinished signal and in DiveLocationLineEdit::currDiveSite() return a null pointer if the string is empty. This means that it is not possible to have a dive site with an empty string, but that shouldn't be a problem, right? Fixes #2148 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-04Cleanup: remove unnecessary display refreshGravatar Berthold Stoeger
In ProfileWidget2::splitDive() updateDiveInfo was emitted, but the UndoCommand does this by itself. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-04Cleanup: avoid spurious updateDiveInfo() callsGravatar Berthold Stoeger
In 2e230da3610dd1fc61badaf328a084512895fb90 the dive-selection signals were unified. Sadly, this was done in a suboptimal way resulting in numerous calls to updateDiveInfo(), which refreshes the main-tab. Firstly, the MainWindow connected to selection changes from both, the undo-command and the divelist. Secondly, every selected dive in the divelist caused a single signal. Thus, connect only to the divelist (this is necessary for user-initiated selection changes) and only send a single signal in the divelist per selection-reset. This is still less than perfect as updateDiveInfo() is called even if the current dive doesn't change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-28Planner: Wait minimum switch time when bailing out to OCGravatar Robert C. Helling
Bailing out does not happen instantly. Rather wait for the minimum stop switch duration before ascending. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-06-28Dive merge: don't use unset dive numbersGravatar Berthold Stoeger
On merging, don't use the number of the first dive if it is 0. Use the first non-zero number. Fixes #2126 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-28Cleanup: remove includes from extern "C" blockGravatar Berthold Stoeger
In "core/save-html.h", the "core/dive.h" header was included in the extern "C" block. This is invalid, because "core/dive.h" included from C++ code contains Qt macros that expand to C++ templates. These in turn must not have extern "C" linkage, since a plain C-linker cannot handle such things. The only reason this worked is that in all cases "core/save-html.h" was included after "core/dive.h". The include of the latter in the former had therefore not effect. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-28Import: use TRIP_THRESHOLD when checking for trip-overlapGravatar Berthold Stoeger
When checking for trip-overlap on import, only really overlapping trips have been considered, i.e. when dives had overlapping times. Instead use the TRIP_THRESHOLD so that on download dives are added to the same trip if in a two-days time frame. Reported-by: Miika Turkia <miika.turkia@gmail.com> Reported-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-26User manual update (update 1 of 3)Gravatar willemferguson
Text has been added for the undo facility and for the specification of atmospheric pressure. Two images added. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-06-25Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-24Desktop: small optimizationGravatar Dirk Hohndel
This way we don't need to iteratively grow the QVector. Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-24Desktop: update dive list when dive sites changeGravatar Dirk Hohndel
Now when we change dive site location or name through a redo, the dive list is updated as expected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-24Desktop: update flags on the map when dive sites changeGravatar Dirk Hohndel
Now when we change dive site location or name through a redo, the flags and associated name are always reflected correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-24Cleanup: simple consistencyGravatar Dirk Hohndel
Same pattern as the other functions in this group. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-24Desktop: fix time editingGravatar Dirk Hohndel
We were shifting in the wrong direction. Which caused the field to be marked as 'edited' again, which meant we shifted the wrong way and twice the distance. This seems to fix the problem for both date and time editing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-23Cleanup: unify selection signalsGravatar Berthold Stoeger
For historic reasons, there where three distinct signals concerning dive-selection from the undo-machinery: 1) divesSelected: sent newly selected dives 2) currentDiveChanged: sent if the current dive changed 3) selectionChanged: sent at the end of a command if either the selection or the current dive changed Since now the undo-commands do a full reset of the selection, merge these three signals into a single signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-23Cleanup: remove selectionChanged logic from dive-list commandsGravatar Berthold Stoeger
Since all commands now fully reset the selection, there is no point in keeping track of whether the selection changed on addition or removal of dives. This can be done in the function that sets the selection. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-23Undo: unify selection behavior in dive-list commandsGravatar Berthold Stoeger
Some commands tried to retain the current selection on undo/redo, others set the selection to the modified dives. The latter was introduced because it was easier in some cases, but it is probably more user-friendly because the user gets feedback on the change. Therefore, unify to always select the affected dives on undo()/redo(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-23Undo: don't send signals batched by tripGravatar Berthold Stoeger
Since the default view is batched by trips, signals were sent trip-wise. This seemed like a good idea at first, but when more and more parts used these signals, it became a burden. Therefore push the batching to the part of the code where it is needed: the trip view. The divesAdded and divesDeleted are not yet converted, because these are combined with trip addition/deletion. This should also be detangled, but not now. Since the dive-lists were sorted in the processByTrip function, the dive-list model now does its own sorting. This will have to be audited. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-23Dive list: cache shown flag in model (quick-fix for undo-crash)Gravatar Berthold Stoeger
We have a very fundamental problem with data-duplication in core and qt-models. In a particular case, this led to an easily reproducible crash: 1) An undo command moved the last dive of a trip to another. 2) When an undo-command removed the last dive of a trip to a different trip, the dive was removed from the trip in the core. Then, the model was updated. 3) That lead at first to a rearrangement of the trips, because the trip with the added dive is moved before the trip with the removed dive. 4) In such a case, the filter-model checks the visibility of the trip. 5) Since the trip with the removed dive has no dives in the core, visibility was determined as false. 6) From this point on the mappings of the QSortFilterProxyModel were messed up. Accesses led to crashes. It is unclear whether this is a Qt bug or only a QOI issue. As a quick-fix, cache the visibility flag of trips directly in the Qt-models. Don't set the visibility directly in the core, but go via the Qt-models. Thus, a more clear layering is achieved. In the long run, we can hopefully get rid of the data-duplication in the models. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-23Desktop: use local variable instead of displayed_diveGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-23Desktop: don't use planner to manually add diveGravatar Dirk Hohndel
Instead of calling into the planner, simply create the dive computer information right there, using the existing helper function we have to create simple profiles. Fixes #2128 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-06-22Update user-manual_es.txt to commit 30f2d16daGravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2019-06-19Undo: sort dives by dive_less_than() in signalsGravatar Berthold Stoeger
In signals dives were sorted by date. This criterion is not be unique. Therefore sort by the dive_less_than() function of the core to avoid any inconsistencies between the Qt-models and the core data. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19Cleanup: return directly from data() methodsGravatar Berthold Stoeger
There is this anti-pattern in QModel data() functions to assign to a "ret" variable and return at the end of the function. This is inefficient, as the object is not directly constructed at the space reserved by the caller. Change the functions in WeightModel and CylinderModel to return the objects directly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>