mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
7aefd704c2
commit
4c43764b36
8 changed files with 46 additions and 40 deletions
|
|
@ -24,8 +24,8 @@ ScatterSeries::~ScatterSeries()
|
|||
{
|
||||
}
|
||||
|
||||
ScatterSeries::Item::Item(StatsView &view, ScatterSeries *series, dive *d, double pos, double value) :
|
||||
item(view.createChartItem<ChartScatterItem>(ChartZValue::Series, d->selected)),
|
||||
ScatterSeries::Item::Item(StatsView &view, ScatterSeries *series, const StatsTheme &theme, dive *d, double pos, double value) :
|
||||
item(view.createChartItem<ChartScatterItem>(ChartZValue::Series, theme, d->selected)),
|
||||
d(d),
|
||||
selected(d->selected),
|
||||
pos(pos),
|
||||
|
|
@ -50,7 +50,7 @@ void ScatterSeries::Item::highlight(bool highlight)
|
|||
|
||||
void ScatterSeries::append(dive *d, double pos, double value)
|
||||
{
|
||||
items.emplace_back(view, this, d, pos, value);
|
||||
items.emplace_back(view, this, theme, d, pos, value);
|
||||
}
|
||||
|
||||
void ScatterSeries::updatePositions()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue