The 'isReady' boolean flag is now set to 'true' only
once the Component.onCompleted slot is reached.
The flag is then used as a safe-guard in the
onZoomLevelChanged slot. Calculate the small circle radius
(mapHelper.calculateSmallCircleRadius()) only if 'isReady'
is set to true.
Prevents a crash if the Map widget is not ready, yet a zoom
level is set via the 'zoomLevel' property. The crash happens
because mapHelper.calculateSmallCircleRadius() has a callback
to the Map component to estimate some points and distances of the
small circle.
Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Commit 344d976593 resulted in the start of Subsurface with a map of
the whole world. The user has to zoom in (assuming the case that the
first selected dive has a position), in evenry session. This is solved
by setting the zoomlevel at startup at the default value. Ok, this
results in a map of central London, UK, when starting Subsurface with
a dive without location, but is this as good as any map.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
When enabling the dive list filter via the menu entry
"Log->Filter dives" and then switch off the filter via the small "close"
button of the filter:
Set the checked status of the menu entry correctly.
Also set it correctly when switching on/off via the menu entry to avoid
any situation where it is not synced.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Switch to a newer SHA, so that at least my commit is in. Checked
the newer version, and no other artefacts seen. I think we
should try to follow master where we can (but controlled).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This string is substituted with the runtime increments derived of slight
variations in depth or bottom time in:
diveplannermodel.cpp:1058:
displayed_dive.notes = strdup(notes.replace("VARIATIONS", QString(buf)).toUtf8().data());
Translating it avoids substitution and we just get the translated
string.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
A not perfect improvement, but way better IMHO. Prevent the list of
downloaded dives to grow over the buttons at the bottom. Just a simple
change by adding a bottomMargin to the list.
Notice that there is still some overlap, but for now I consider this a
trade-off between the scarce screen real-estate and the wish to present
and much as possible dowloaded dives.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Trip headers spanning more than one line where broken at incorrect
locations in the string. Not exactly sure, but I think this came with
the newest Kirigami SHA, and especially the Label change.
Carefully reading the code for the trip heading shows a "strange"
negative margin. So the margin is on the outside. This margin was
used to split the string, allowing for a small invisible part of
the string to present as trip header.
This is solved by this commit.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Fixes minor interface inconsistency: After a failed download, the
error message was also shown on subsequent successful downloads.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Otherwise the following call to do_git_save will potentially have incorrect information
about the cache validity of the dives in the divelist.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We only do this in verbose mode to make sure a report contains the information
about the existing files used.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Inexplicably, commit 8b7427c56d ("Move CloudStorage out of the widgets")
didn't just move the code but added a local member 'verbose' that hides
our global variable...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
report_error() now does this automatically. So all these odd places in which we tried
to make sure that we show errors are no longer needed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This became rather obvious with the change to immediately show errors.
The commit also fixes a small memory leak.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of waiting for a manual call to showError(), simply use the new
callback to always immediately show the error in the notification widget.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After we download new dives we need to try to autogroup them.
In Subsurface this is done when we refresh the dive list. Here
we might be better off doing it right after processing the new
dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This does two main things to the map widget:
- if there are no coordinates, do *not* zoom out to the whole-world
view. Just leave the map alone.
- when zooming out to move to a new dive site, zoom back in to the same
zoom level it was before.
These two changes make it much more pleasant to move between dives,
particularly as you move back-and-forth without losing the zoom level.
NOTE! The zoom level gets reset if you move dives _while_ zooming is
happening, and so moving quickly between dives will still end up losing
the original zoom level, replacing it with a bigger zoom-out that was
active _during_ a previous zoom.
That could be seen as a feature (moving incrementally to an "overview"
zoom when moving quickly between dive sites), but honestly it smells
more like a bug to me. But regardless of that feature/bug, this new
zoom behavior is more pleasant than our older "always reset when
moving".
But it might be a matter of taste, so people should try this out and
comment.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation,org>
Cc: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
See referenced issue number. It leads back to an ancient (3 year old)
commit 512c42e. Not sure this issue is introduced there, but that's not
relevant.
Key in reproducing this is the location where the context menu is
requested (using the right mouse button). When it is the row next
to the trip, the add-to-trip succeeds correctly, otherwise
it is a no-op.
The solution is rather trivial (in hindsight). Just loop over the
selected dives, and try to find the trip we want to add to.
Fixes: #522
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
When trying to trace down an unrelated issue with flag icons, I realized
that these two are no longer used. They were part of our Marble setup.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Require the FULLSCREEN_SUPPORT macro to enable fullscreen
support.
The toggle was added 4 years ago in Subsurface, but with the
current version of Qt 5.9.x, it's very buggy on Windows and
Ubuntu. While it's possible to make this work on Windows,
it seems to behave broken in different ways on different
versiosn of Ubuntu.
Fixes#705
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
When deleting a cylinder the mapping was not filled with all
necessary values. Values for cylinders before deleted cylinder were
missing.
Plus do the endRemoveRows at the right time.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Unsure where and why this got changed in the update to 4.7.
In pSCR world, the gas that is currently driving the rebreater is
called a "driving gas". This is not per definition backgas, as any
gas can be plugged in by means of a swichblock.
Further. The gas that is trown away (typically 10%) is released
from the unit at inhale of the diver. Yes, this may sound weird
to the average OC diver, but it is like that. It's by design.
All this wisdom from a GUE trained RB80 diver :-)
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>