Fix frame node text ignoring blank lines

This commit is contained in:
Campbell Barton 2016-02-19 09:22:26 +11:00
parent 411deae9b0
commit 2fbdf9adc7
1 changed files with 8 additions and 3 deletions

View File

@ -441,9 +441,14 @@ static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float asp
for (line = text->lines.first; line; line = line->next) {
struct ResultBLF info;
BLF_position(fontid, x, y, 0);
BLF_draw_ex(fontid, line->line, line->len, &info);
y -= line_spacing * info.lines;
if (line->line[0]) {
BLF_position(fontid, x, y, 0);
BLF_draw_ex(fontid, line->line, line->len, &info);
y -= line_spacing * info.lines;
}
else {
y -= line_spacing;
}
if (y < y_min) {
break;
}