diff options
Diffstat (limited to 'src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp')
-rw-r--r-- | src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp b/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp index 211aa4e5..1d38c9ab 100644 --- a/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp +++ b/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp @@ -57,7 +57,7 @@ void HorizontalStackedBarChartItem::initializeLayout(int set, int category, checkIndex--; QBarSet *checkSet = m_series->barSets().at(checkIndex); const qreal checkValue = checkSet->at(category); - if (value < 0.0 == checkValue < 0.0) { + if ((value < 0.0) == (checkValue < 0.0)) { Bar *checkBar = m_indexForBarMap.value(checkSet).value(category); rect = m_layout.at(checkBar->layoutIndex()); found = true; @@ -165,8 +165,8 @@ QVector<QRectF> HorizontalStackedBarChartItem::calculateLayout() if (m_animation && value != 0.0) { const QRectF &checkRect = m_layout.at(bar->layoutIndex()); if (checkRect.isEmpty() && - (value < 0.0 && !qFuzzyCompare(checkRect.right(), rect.right()) - || value > 0.0 && !qFuzzyCompare(checkRect.left(), rect.left()))) { + ((value < 0.0 && !qFuzzyCompare(checkRect.right(), rect.right())) + || (value > 0.0 && !qFuzzyCompare(checkRect.left(), rect.left())))) { initializeLayout(set, category, bar->layoutIndex(), true); } } |