##// END OF EJS Templates
Fix legend truncation...
Titta Heikkala -
r2673:fc7673506633
parent child
Show More
@@ -158,7 +158,7 void LegendLayout::setAttachedGeometry(const QRectF &rect)
158 // If the items would occupy more space than is available, start truncating them
158 // If the items would occupy more space than is available, start truncating them
159 // from the longest one.
159 // from the longest one.
160 qreal availableGeometry = geometry.width() - right - left * 2 - itemMargins;
160 qreal availableGeometry = geometry.width() - right - left * 2 - itemMargins;
161 if (markerItemsWidth >= availableGeometry) {
161 if (markerItemsWidth >= availableGeometry && legendWidthList.count() > 0) {
162 bool truncated(false);
162 bool truncated(false);
163 int count = legendWidthList.count();
163 int count = legendWidthList.count();
164 for (int i = 1; i < count; i++) {
164 for (int i = 1; i < count; i++) {
General Comments 0
You need to be logged in to leave comments. Login now