summaryrefslogtreecommitdiffstats
path: root/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp')
-rw-r--r--src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp b/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
index 51ab680d..42c02568 100644
--- a/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
+++ b/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
@@ -63,7 +63,7 @@ void StackedBarChartItem::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;
@@ -169,8 +169,8 @@ QVector<QRectF> StackedBarChartItem::calculateLayout()
if (m_animation && value != 0.0) {
const QRectF &checkRect = m_layout.at(bar->layoutIndex());
if (checkRect.isEmpty() &&
- (value < 0.0 && !qFuzzyCompare(checkRect.top(), rect.top())
- || value > 0.0 && !qFuzzyCompare(checkRect.bottom(), rect.bottom()))) {
+ ((value < 0.0 && !qFuzzyCompare(checkRect.top(), rect.top()))
+ || (value > 0.0 && !qFuzzyCompare(checkRect.bottom(), rect.bottom())))) {
initializeLayout(set, category, bar->layoutIndex(), true);
}
}