desktop: automatically reload completion-models

Instead of programatically reload the completion models, listen
to the relevant signals in the models. To that goal, derive all
the models from a base class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-11-14 17:42:59 +01:00 committed by Dirk Hohndel
parent 52d5125926
commit 38a784f5af
5 changed files with 83 additions and 36 deletions

View file

@ -127,7 +127,6 @@ void TabDiveEquipment::updateData()
{
cylindersModel->updateDive(current_dive);
weightModel->updateDive(current_dive);
suitModel.updateModel();
ui.cylinders->view()->hideColumn(CylindersModel::DEPTH);
bool is_ccr = current_dive && get_dive_dc(current_dive, dc_number)->divemode == CCR;