summaryrefslogtreecommitdiffstats
path: root/src/charts/scatterchart/scatterchartitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/charts/scatterchart/scatterchartitem.cpp')
-rw-r--r--src/charts/scatterchart/scatterchartitem.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/charts/scatterchart/scatterchartitem.cpp b/src/charts/scatterchart/scatterchartitem.cpp
index 1558cc60..a358e4f2 100644
--- a/src/charts/scatterchart/scatterchartitem.cpp
+++ b/src/charts/scatterchart/scatterchartitem.cpp
@@ -273,6 +273,7 @@ void ScatterChartItem::handleUpdated()
m_pointLabelsVisible = m_series->pointLabelsVisible();
m_pointLabelsFont = m_series->pointLabelsFont();
m_pointLabelsColor = m_series->pointLabelsColor();
+ bool labelClippingChanged = m_pointLabelsClipping != m_series->pointLabelsClipping();
m_pointLabelsClipping = m_series->pointLabelsClipping();
if (recreate) {
@@ -285,7 +286,11 @@ void ScatterChartItem::handleUpdated()
setPen(m_series->pen());
setBrush(m_series->brush());
- update();
+ // Update whole chart in case label clipping changed as labels can be outside series area
+ if (labelClippingChanged)
+ m_series->chart()->update();
+ else
+ update();
}
QT_CHARTS_END_NAMESPACE