Skip to content

Commit

Permalink
Fix precipitation histogram possibly not showing snow
Browse files Browse the repository at this point in the history
Refs: #94
  • Loading branch information
orontee committed Jul 8, 2024
1 parent 2751b2e commit d3ac797
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed

- Fix precipitation histogram possibly not showing snow due to
incomplete check [#94](https://github.com/orontee/taranis/issues/94)

### Removed

## [1.8.0 - 2024-02-21]
Expand Down
2 changes: 1 addition & 1 deletion src/hourlyforecastbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void HourlyForecastBox::draw_precipitation_histogram() const {
const auto forecast_index = this->forecast_offset + bar_index;
if (forecast_index < this->model->hourly_forecast.size()) {
const auto forecast = this->model->hourly_forecast[forecast_index];
if (std::isnan(forecast.rain)) {
if (std::isnan(forecast.rain) and std::isnan(forecast.snow)) {
continue;
}
const auto bar_center_x = (bar_index + 1.0 / 2) * this->bar_width;
Expand Down

0 comments on commit d3ac797

Please sign in to comment.