This may be too subtle... the current dive site now has a brighter flag
than the others. I may need to make it an even bigger difference or maybe
make the flag a little bigger or something... but it's a start.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This looks if we're importing any o2 values form the csv file, then its
probably a CCR dive.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of replacing all the empty model tags after a csv to xml
transform with some text, just produce that text in the csv to xml
transform instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds support for importing individual O2 sensors from a CSV file,
e.g. an APD log viewer file.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Designer is such an utter piece of crap I am at a lack for words.
After a few hours with a real UI tool (i.e., vim) I have the preferences
dialog reasonably close to where I want it. It's still not perfect, but at
least it no longer contains tons of unused space, it fits fine on a
1024x768 screen and it is visually consistent across the different pages.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In subsurface we store no value as a NULL pointer everywhere, but
sometimes some structures returns a empty field as a empty string.
This teaches our helper copy_string to return NULL if you try to copy a
empty string.
This fixes a bug where we store buddy and divemaster in git as empty
strings if they passed via MainTab::saveTaggedStrings().
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We start out with our default. If we zoom out because of no GPS data, we
remember the now current zoom value, but only if we aren't in the middle
of a "flight". If we are in the middle of a flight we simply keep the last
value we remembered - that means we might forget a user made change, but
at least we won't suddenly remember a random number as our zoom value.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
No point in remembering the "current" zoom while we are flying to a new
position. Also make sure you remember things before we start a new flight.
Finally, set the radius to 1000 which is what Marble recommends for a zoom
that shows the whole globe.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't erase the trip information after the user started editing it.
Don't act as if a dive was edited - it's trip information we are
modifying.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I had to create an event filter to deal with the missing callbacks from
QPlainTextEdit (it doesn't support editingFinished()).
Also we need to manually create a dive site on a newly added dive if the
user entered one.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The way I was doing the old location management was very dull: everything
was tangled on the mainwindow. Now I think I've found the correct way to
create this, and thus, this code can die.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't work yet because we don't get the taxonomy from the geo
referencing services yet - but it's ready to be populated.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hopefully we now have the UI semantics figured out.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When option is enabled, if a stop is not otherwise required, a gas switch will be delayed until a stop is reached. This option is ignored if the current gas is hypoxic.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the option to only switch at required stop to the planner UI. This is not actually used yet.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is required so they work in the test for /* do we want to skip this leg as it is devoid of anything useful? */
We were already trying to use gaschange_after (and previously gaschange), but it was duplicating an existing condition (now removed).
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise reading in the dive site uuids will break on 32bit machines (as
all values >= 0x80000000 will be truncated to LONG_MAX).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should use this consistently throughout the code instead of manually
assembling strings and messing with memory all over the place.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The longer I stared at the existing code the less it made sense.
So instead I rewrote it in a way that seems logical to me. And added a
boatload of debugging output (which needs to be removed, of course).
I tested this against more than a hundred dives and it seemed to always
pick the right fix.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Previously gaschange_after was never being set back to false. Now it will be.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Avoid counting the selected dives - we have that number.
But also don't return 0 because we devide by the total work for the
progress bar.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>