subsurface/mobile-widgets
Dirk Hohndel f19e10209c mobile: fix broken cylinder name tracking in dive edit
Prior to this change, we had two different cylinder lists as models for
drop down boxes - one that prepends the "no default cylinder" entry
(which we need for setting up no default cylinder to be used in the
app), and another one that only includes actual cylinders.

The problem occured if a dive is created before the first time we edit
an existing dive: in this case we are applying indices across the two
models, but the indices are of course off by one; this results in
actually picking the wrong cylinder. So each time we try to edit a dive,
we end up with the previous cylinder in the list.

This commit simplifies the code by having only one place where we create
list of cylinder names (which is then used as the model for the combo
box). It also uses more logical names for the two 'flavors' of this list
to make it clear which one is supposed to be used (the regular list when
editing or adding dives, the one with the "no default cylinder" entry
prependet for the Settings page).

Reported-by: Brian Fransen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-02 12:41:00 -07:00
..
3rdparty mobile/UI: correctly update title bar font size 2021-01-19 12:42:48 -08:00
qml mobile: fix broken cylinder name tracking in dive edit 2021-09-02 12:41:00 -07:00
CMakeLists.txt statistics: add a skeleton StatsManager class 2021-01-10 15:16:52 -08:00
qmlinterface.cpp mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlinterface.h mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlmanager.cpp mobile: fix broken cylinder name tracking in dive edit 2021-09-02 12:41:00 -07:00
qmlmanager.h mobile: fix broken cylinder name tracking in dive edit 2021-09-02 12:41:00 -07:00
statsmanager.cpp mobile/statistics: make charts model available to UI 2021-01-13 11:39:36 -08:00
statsmanager.h mobile/statistics: make charts model available to UI 2021-01-13 11:39:36 -08:00
themeinterface.cpp mobile/UI: remember the system default font size 2021-01-19 12:35:29 -08:00
themeinterface.h mobile/UI: remember the system default font size 2021-01-19 12:35:29 -08:00