mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
Un-tie plannner model from profile on mobile
Do not pull in the DivePlannerPointsModel::instance as this is not used in the called function. We (currently) do not support deco computations on mobile, so trying to pull in any deco state from the planner is futile anyway. With this uncoupling, 6 more model files are not needed in mobile any more. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
14e6c132c8
commit
9c01315d31
2 changed files with 14 additions and 9 deletions
|
@ -606,8 +606,13 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
|
|||
* so I'll *not* calculate everything if something is not being
|
||||
* shown.
|
||||
*/
|
||||
|
||||
plotInfo = calculate_max_limits_new(&displayed_dive, currentdc);
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth, &DivePlannerPointsModel::instance()->final_deco_state);
|
||||
#else
|
||||
create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth, nullptr);
|
||||
#endif
|
||||
int newMaxtime = get_maxtime(&plotInfo);
|
||||
if (shouldCalculateMaxTime || newMaxtime > maxtime)
|
||||
maxtime = newMaxtime;
|
||||
|
@ -1662,11 +1667,11 @@ void ProfileWidget2::editName()
|
|||
|
||||
void ProfileWidget2::disconnectTemporaryConnections()
|
||||
{
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
|
||||
disconnect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot()));
|
||||
disconnect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot()));
|
||||
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
disconnect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
|
||||
this, SLOT(pointInserted(const QModelIndex &, int, int)));
|
||||
disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
|
||||
|
|
|
@ -3,28 +3,28 @@
|
|||
|
||||
# models used both mobile and desktop builds
|
||||
set(SUBSURFACE_GENERIC_MODELS_LIB_SRCS
|
||||
cleanertablemodel.cpp
|
||||
cylindermodel.cpp
|
||||
models.cpp
|
||||
tankinfomodel.cpp
|
||||
divepicturemodel.cpp
|
||||
diveplannermodel.cpp
|
||||
treemodel.cpp
|
||||
diveplotdatamodel.cpp
|
||||
diveimportedmodel.cpp
|
||||
)
|
||||
|
||||
# models exclusively used in desktop builds
|
||||
set(SUBSURFACE_DESKTOP_MODELS_LIB_SRCS
|
||||
cleanertablemodel.cpp
|
||||
models.cpp
|
||||
tankinfomodel.cpp
|
||||
treemodel.cpp
|
||||
maplocationmodel.cpp
|
||||
cylindermodel.cpp
|
||||
yearlystatisticsmodel.cpp
|
||||
weigthsysteminfomodel.cpp
|
||||
weightmodel.cpp
|
||||
weightmodel.cpp
|
||||
filtermodels.cpp
|
||||
divecomputermodel.cpp
|
||||
divetripmodel.cpp
|
||||
diveplannermodel.cpp
|
||||
divecomputerextradatamodel.cpp
|
||||
completionmodels.cpp
|
||||
completionmodels.cpp
|
||||
divelocationmodel.cpp
|
||||
ssrfsortfilterproxymodel.cpp
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue