stats: don't pass StatsTheme in ChartItem::render

To make the qt-quick code of the statistics module more general,
don't pass the StatsTheme in render calls to ChartItems. Items
that need it, may just store a reference to the theme.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2023-04-16 12:19:56 +02:00
parent 7aefd704c2
commit 4c43764b36
8 changed files with 46 additions and 40 deletions

View file

@ -266,7 +266,7 @@ std::vector<BarSeries::SubItem> BarSeries::makeSubItems(std::vector<SubItemDesc>
for (auto &[v, dives, label]: items) {
if (v > 0.0) {
bool selected = allDivesSelected(dives);
res.push_back({ view.createChartItem<ChartBarItem>(ChartZValue::Series, barBorderWidth),
res.push_back({ view.createChartItem<ChartBarItem>(ChartZValue::Series, theme, barBorderWidth),
std::move(dives),
{}, from, from + v, bin_nr, selected });
if (!label.empty())