mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
desktop: disable extradata tab if no site selected
Owing to bit-rot, the extradata tab was not disabled if no dive is selected. The reason was that there was an additional tab (dive-computers) that should not be disabled. However that tab was removed and now the extradata tab was not disabled. Fix this, but note that there is another of these 'parasitic' tabs, that should be removed, namely the dive-site tab. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3abb82bfd5
commit
724af75722
1 changed files with 4 additions and 4 deletions
|
@ -107,11 +107,11 @@ void MainTab::updateDiveInfo()
|
|||
if (DivePlannerPointsModel::instance()->isPlanner())
|
||||
return;
|
||||
|
||||
// If there is no current dive, disable all widgets except the last two,
|
||||
// which are the dive site tab and the dive computer tabs.
|
||||
// TODO: Conceptually, these two shouldn't even be a tabs here!
|
||||
// If there is no current dive, disable all widgets except the last one,
|
||||
// which is the dive site tab
|
||||
// TODO: Conceptually, this shouldn't even be a tab here!
|
||||
bool enabled = current_dive != nullptr;
|
||||
for (int i = 0; i < extraWidgets.size() - 2; ++i)
|
||||
for (int i = 0; i < extraWidgets.size() - 1; ++i)
|
||||
extraWidgets[i]->setEnabled(enabled);
|
||||
|
||||
if (current_dive) {
|
||||
|
|
Loading…
Reference in a new issue