Fix salinity combo/icon when DC doesnt have salinity info

Today salinity combo is editable if one of these rules matches: The dive was manually entered or if salinity edition is allowed in preferences.
However we can have cases that dives were downloaded but its doesn't have salinity info.

This fix considers if there's a DC salinity info to decides combo edition and if salinity change indicator will be showed or not.
If DC doesn't have salinity, the UI behavior is the same of a manual dive

Signed-off-by: Rafael M. Salvioni <rafael.salvioni@gmail.com>
This commit is contained in:
Rafael M. Salvioni 2023-03-29 12:49:55 -03:00 committed by Michael Keller
parent 90e5de8357
commit 1e082affdd
3 changed files with 16 additions and 22 deletions

View file

@ -33,7 +33,6 @@ private slots:
void on_waterTypeCombo_activated(int index);
private:
Ui::TabDiveInformation *ui;
bool manualDive;
void updateProfile();
int updateSalinityComboIndex(int salinity);
void checkDcSalinityOverWritten();