summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/boxplotchart/boxplotchartitem.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/boxplotchart/boxplotchartitem.cpp b/src/boxplotchart/boxplotchartitem.cpp
index eff7388c..ff320413 100644
--- a/src/boxplotchart/boxplotchartitem.cpp
+++ b/src/boxplotchart/boxplotchartitem.cpp
@@ -82,8 +82,15 @@ void BoxPlotChartItem::handleDataStructureChanged()
connect(box, SIGNAL(hovered(bool, QBoxSet *)), set, SIGNAL(hovered(bool)));
// Set the decorative issues for the newly created box
- box->setBrush(m_series->brush());
- box->setPen(m_series->pen());
+ // so that the brush and pen already defined for the set are kept.
+ if (set->brush() == Qt::NoBrush)
+ box->setBrush(m_series->brush());
+ else
+ box->setBrush(set->brush());
+ if (set->pen() == Qt::NoPen)
+ box->setPen(m_series->pen());
+ else
+ box->setPen(set->pen());
box->setBoxOutlined(m_series->boxOutlineVisible());
box->setBoxWidth(m_series->boxWidth());
}