##// END OF EJS Templates
Fix label visibility for category axis...
Titta Heikkala -
r2651:99ad874661ac
parent child
Show More
@@ -148,10 +148,9 void HorizontalAxis::updateGeometry()
148 148 }
149 149 }
150 150 //label overlap detection - compensate one pixel for rounding errors
151 if ((labelItem->pos().x() < width || forceHide ||
151 if (labelItem->pos().x() < width || forceHide ||
152 152 (labelItem->pos().x() + (widthDiff / 2.0)) < (axisRect.left() - 1.0) ||
153 (labelItem->pos().x() + (widthDiff / 2.0) - 1.0) > axisRect.right())
154 && !intervalAxis()) {
153 (labelItem->pos().x() + (widthDiff / 2.0) - 1.0) > axisRect.right()) {
155 154 labelItem->setVisible(false);
156 155 } else {
157 156 labelItem->setVisible(true);
@@ -153,10 +153,9 void VerticalAxis::updateGeometry()
153 153 }
154 154
155 155 //label overlap detection - compensate one pixel for rounding errors
156 if ((labelItem->pos().y() + boundingRect.height() > height || forceHide ||
156 if (labelItem->pos().y() + boundingRect.height() > height || forceHide ||
157 157 (labelItem->pos().y() + (heightDiff / 2.0) - 1.0) > axisRect.bottom() ||
158 labelItem->pos().y() + (heightDiff / 2.0) < (axisRect.top() - 1.0))
159 && !intervalAxis()) {
158 labelItem->pos().y() + (heightDiff / 2.0) < (axisRect.top() - 1.0)) {
160 159 labelItem->setVisible(false);
161 160 }
162 161 else {
General Comments 0
You need to be logged in to leave comments. Login now