This way they get correctly prepared and derived data fields
get populated. For example, the dive number gets updated if
these are indeed the newest dives.
Fixes#408
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I noticed this in the mobile download code when fixing an unrelated
issue - and then realized that the same was true in the desktop app
as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When (with mobile on desktop) loading from DC is called and the dive computer
to connect to is not in download mode, the repopulate() function is called
with an empty dive table. This trips the assert (obviously, debug compile only) in
DiveImportedModel::setImportedDivesIndexes(). This simple fix makes things just
more robust.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This already takes into account which of those dives were selected.
Right now all we have is select all or none - this needs actual support
in the UI, but once that's there, it will just work (famous last words).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Still to do:
- select the dives to save
- record the downloaded dives
but download is already working. :)
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is important to not duplicate code for the Qml
view. Now the DownloadFromDiveComputer widget is mostly
free from important code (that has been upgraded to the
core folder), and I can start coding the QML interface.
There are still a few functions on the desktop widget
that will die so I can call them via the QML code later.
I also touched the location of a few globals (please, let's
stop using those) - because it was declared on the
desktop code and being used in the core.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>