core: move number_of_divecomputers to struct dive

Feels natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 17:16:14 +02:00 committed by bstoeger
parent e90251b0cf
commit 6e29c00f35
8 changed files with 12 additions and 12 deletions

View file

@ -328,7 +328,7 @@ void MainWindow::divesSelected(const std::vector<dive *> &selection, dive *curre
// Activate cursor keys to switch through DCs if there are more than one DC.
if (currentDive) {
bool nr = number_of_computers(current_dive) > 1;
bool nr = currentDive->number_of_computers() > 1;
enableShortcuts();
ui.actionNextDC->setEnabled(nr);
ui.actionPreviousDC->setEnabled(nr);