profile: connect to DivePointsPlannerModel in separate function

The connection to the DivePointsPlannerModel was done in two
distinct functions: setAddState() and setPlanState(), which
means that these could easily get out-of-sync. Factor this out
into a single function.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-25 14:38:57 +01:00 committed by Dirk Hohndel
parent dee1fea683
commit 94633d2156
2 changed files with 16 additions and 14 deletions

View file

@ -256,6 +256,7 @@ private:
std::vector<std::unique_ptr<DiveHandler>> handles;
int handleIndex(const DiveHandler *h) const;
#ifndef SUBSURFACE_MOBILE
void connectPlannerModel();
void repositionDiveHandlers();
int fixHandlerIndex(DiveHandler *activeHandler);
DiveHandler *createHandle();