Do not display an elevation number when there is non

This commit is contained in:
AdenKoperczak 2025-04-13 10:59:41 -04:00
parent 484c08c455
commit 24f5f0a3e3
No known key found for this signature in database
GPG key ID: 9843017036F62EE7
12 changed files with 166 additions and 145 deletions

View file

@ -242,7 +242,9 @@ void Level2SettingsWidget::UpdateElevationSelection(float elevation)
void Level2SettingsWidget::UpdateSettings(map::MapWidget* activeMap)
{
float currentElevation = activeMap->GetElevation();
std::optional<float> currentElevationOption = activeMap->GetElevation();
float currentElevation =
currentElevationOption.has_value() ? *currentElevationOption : 0.0f;
std::vector<float> elevationCuts = activeMap->GetElevationCuts();
if (p->elevationCuts_ != elevationCuts)