Skip to content

Commit

Permalink
fix: calculation of max_samples based on settings
Browse files Browse the repository at this point in the history
remove integer division, use correct settings string
  • Loading branch information
vtx22 committed Mar 4, 2025
1 parent 45e49fa commit 2c6f3f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PlottingWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ void PlottingWindow::update_content()

uint32_t max_samples = std::stoi(_config_handler.ini["downsampling"]["max_samples"]);

if (_config_handler.ini["downsampling"]["max_samples_type"] == "Total" && datasets.size() != 0)
if (_config_handler.ini["downsampling"]["max_samples_type"] == "0" && datasets.size() != 0)
{
max_samples = max_samples / datasets.size();
max_samples = static_cast<uint32_t>(round(max_samples / (double)datasets.size()));
}

for (auto &ds : datasets)
Expand Down

0 comments on commit 2c6f3f8

Please sign in to comment.