summaryrefslogtreecommitdiffstats
path: root/src/charts/linechart/linechartitem.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-09 03:09:25 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-11 11:48:38 +0200
commitbeb856b0b003768e918313407d299c925cf029a9 (patch)
tree900757afd348bb8423a527f1db43d698fd1dff45 /src/charts/linechart/linechartitem.cpp
parent2c594640231592d59654a9b1164f3278fa736e16 (diff)
parent8b79dba3fd204ca4161ec7e7293cb95d698ce9db (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: I2cb3defb9f1fc8c8bf1e3ac512cb2e6873db8e39
Diffstat (limited to 'src/charts/linechart/linechartitem.cpp')
-rw-r--r--src/charts/linechart/linechartitem.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/charts/linechart/linechartitem.cpp b/src/charts/linechart/linechartitem.cpp
index b96d263a..99e16d29 100644
--- a/src/charts/linechart/linechartitem.cpp
+++ b/src/charts/linechart/linechartitem.cpp
@@ -354,12 +354,18 @@ void LineChartItem::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 (doGeometryUpdate)
updateGeometry();
else if (m_series->useOpenGL() && visibleChanged)
refreshGlChart();
- update();
+
+ // Update whole chart in case label clipping changed as labels can be outside series area
+ if (labelClippingChanged)
+ m_series->chart()->update();
+ else
+ update();
}
void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
@@ -406,9 +412,7 @@ void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
painter->drawPath(m_linePath);
} else {
painter->setBrush(QBrush(Qt::NoBrush));
- if (m_linePen.style() != Qt::SolidLine
- || painter->renderHints().testFlag(QPainter::Antialiasing)
- || alwaysUsePath) {
+ if (m_linePen.style() != Qt::SolidLine || alwaysUsePath) {
// If pen style is not solid line, always fall back to path painting
// to ensure proper continuity of the pattern
painter->drawPath(m_linePath);