##// END OF EJS Templates
Fix long label visibility...
Titta Heikkala -
r2706:11c2ee82f698
parent child
Show More
@@ -65,6 +65,7 void HorizontalAxis::updateGeometry()
65 65 arrowItem->setLine(gridRect.left(), axisRect.top(), gridRect.right(), axisRect.top());
66 66
67 67 qreal width = 0;
68 const QLatin1String ellipsis("...");
68 69
69 70 //title
70 71 QRectF titleBoundingRect;
@@ -147,8 +148,9 void HorizontalAxis::updateGeometry()
147 148 labelItem->setPos(leftBound + (delta / 2.0) - center.x(), labelItem->pos().y());
148 149 }
149 150 }
151
150 152 //label overlap detection - compensate one pixel for rounding errors
151 if (labelItem->pos().x() < width || forceHide ||
153 if ((labelItem->pos().x() < width && labelItem->toPlainText() == ellipsis) || forceHide ||
152 154 (labelItem->pos().x() + (widthDiff / 2.0)) < (axisRect.left() - 1.0) ||
153 155 (labelItem->pos().x() + (widthDiff / 2.0) - 1.0) > axisRect.right()) {
154 156 labelItem->setVisible(false);
General Comments 0
You need to be logged in to leave comments. Login now