fix: Only truncate labels using label-maxlen

This commit is contained in:
Michael Carlberg 2016-10-07 03:37:47 +02:00
parent 8c8f677f7a
commit ece172c759

View File

@ -213,12 +213,8 @@ void Builder::node(drawtypes::Label *label, bool add_space)
auto text = label->text; auto text = label->text;
if (label->maxlen > 0) { if (label->maxlen > 0 && text.length() > label->maxlen)
text.resize(label->maxlen); text = text.substr(0, label->maxlen) + "...";
if (label->ellipsis && label->text.length() > label->maxlen)
text.append("...");
}
if ((label->ol.empty() && this->o > 0) || (this->o > 0 && label->margin > 0)) if ((label->ol.empty() && this->o > 0) || (this->o > 0 && label->margin > 0))
this->overline_close(true); this->overline_close(true);