The maintab view should be consistent; some fields just go to edit mode
whenever they acquire focus and most of them wait till their values are
changed.
Change the dive notes field to be consistent with the other fields and
only enter edit mode if its value is changed.
[Dirk Hohndel: changed to use same_string()]
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We always call reply->deleteLater(), so we where actually calling delete
on a stale pointer, that caused subsurface to crash on shutdown.
Reported-by: Sergey Starosek <sergey-starosek@yandex.ru>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There are reports that the replace calls can cause the application to
crash. This doesn't seem to make sense, looking at the code - this change
shouldn't make any difference. But it makes it even more clear that there
shouldn't be any possible scenario in which we call replace with an index
that's out of range.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When the help dialog appears, remove the shortcuts for filter and close from
the main window so that the identical keys for the help window work. This is
not necessary on other platforms, but on Mac it appears to be required.
[Dirk Hohndel: Tomaz had a slightly different approach of removing the actions,
instead I changed this to just modify the shortcuts]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We changed this MeanDepthLine to the MeanDepthCurve (or something),
no need to keep old code around.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This ruler shouldn't appear in ADD or PLAN mode, it's a bug
and may crash things.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This hides the whole QWidget with the share-to-fb button in it. This
lets the Notes field expand to the full width.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As the heading above says.
1) Place user manual option in main menu at the bottom of the Help submenu.
It is more easily seen in that position.
2) Replace two images. I forgot one of the images that had been changed to F20 format.
3) A few small changes, including in the systematic description of the main menu.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit e219bc70f8 ("Refactor dctype -> divemode") introduced a few issues.
For one thing it causes a warning about incorrect use of zorder - I don't see
why this would be needed here, so I simply removed it.
Secondly, it adds a new, automatically named layout element that therefore gets
handled by our "consistent margin" code which creates a messy layout for the
Dive Notes tab. This patch gives that horizontal layout a useful name and adds
it to the list of "zero margin" layouts. Signed-off-by: Dirk Hohndel
<dirk@hohndel.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
the manual uses "Sensor 1:", not sure if it breaks anything.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Last index was not included in the selecting or unselecting the
downloaded dives.
Fixes#819
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The reset call hides the progress bar text, and that way it hides our
error messages we try to show with the progress bar.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Mean depth/s sounds too much like a rate of change but this
referers to instantaneus mean depth at a time.
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With this we can easily eliminate duplicates from our user statistics. The
UUID is completely random and there is no way to link it back to a
specific user. By deleting the settings a user can force a new UUID.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In a previous patch, 37830bdb ("Always show deco gas as dive gas") the
semantic of the last variable was changed. This updates other calls to
this function.
This is nothing but documenting changes.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If update checking is allowed we want to do so but we want to be careful,
which messages we show - specifically we don't want to show "your version
is newer" unless it's a manual check.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The unit was stored to the variable after it was used, thus we need to
delay the print of the unit slightly. (In practice the depth unit for
first picture was null before this fix.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
some common nouns, even if the S in OS is capitalized but
that's when it's in acronym form.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This improves the column name matching so our own columns are properly
supported.
See #814
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As changing the export to use tabs, we need to switch the import to do
that as well. However, we also need to support comma separation as older
exports use that.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems that at least in this occasion, the signal blocking requires
the UI element to be given.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The import dialog now displays only a maximum of 10 lines of the CSV
file to be imported.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This assumes that we have either dive details or dive profile, not
combined log files. Before the change in the import UI, user selected
the import type by the tab on import dialog, now we make an educated
guess based on whether sample time field is available.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When we have the separator as tab, we need to use the proper tab
character instead of the string for known imports.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch takes the cylinder pressures of CCR dives and prints them
in a non-overlapping way.
Remaining issue: When the dive profile is made taller by dragging the
window or the appropriate slider far down the screen, the labels move
further apart; similarly, when the profle is made flat/shallow by dragging
the window edge or appropriate slider up, the labels get close to each
other and start to overlap.
There are quite a few lines of additional code going into the patch. This
is primarily because separate provisions for when po2 > p(diluent) or vice
versa. In addition, I could not determine the size of the text characters
which would allow much more precise placement of text. This is because the
.scale member of the text is private and not available in the methods
involved in printing the labels. However, the height of the vertical scale
of the cylinder pressure graph can be determined [e.g. vAxis->maximum()].
This helped a lot to get the positioning of the text more or less correct.
While the results of the patch is not perfect, It contributes
significantly to make the profiles of Poseidon dives more readable.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>