mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: highlight selected boxes in box plot
In analogy to bar plots, highlight selected boxes in box plots. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
91d371374b
commit
bd252fc820
5 changed files with 37 additions and 5 deletions
|
@ -247,7 +247,7 @@ std::vector<BarSeries::SubItem> BarSeries::makeSubItems(std::vector<SubItemDesc>
|
|||
int bin_nr = 0;
|
||||
for (auto &[v, dives, label]: items) {
|
||||
if (v > 0.0) {
|
||||
bool selected = std::all_of(dives.begin(), dives.end(), [] (const dive *d) { return d->selected; });
|
||||
bool selected = allDivesSelected(dives);
|
||||
res.push_back({ view.createChartItem<ChartBarItem>(ChartZValue::Series, barBorderWidth),
|
||||
std::move(dives),
|
||||
{}, from, from + v, bin_nr, selected });
|
||||
|
@ -428,7 +428,7 @@ void BarSeries::divesSelected(const QVector<dive *> &)
|
|||
{
|
||||
for (Item &item: items) {
|
||||
for (SubItem &subitem: item.subitems) {
|
||||
bool selected = std::all_of(subitem.dives.begin(), subitem.dives.end(), [] (const dive *d) { return d->selected; });
|
||||
bool selected = allDivesSelected(subitem.dives);
|
||||
if (subitem.selected != selected) {
|
||||
subitem.selected = selected;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue