Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-02-19 01:22:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-19 01:22:26 +0300
commit2fbdf9adc7486498d378a938f034e4ef3ee840d1 (patch)
treeb652ccd30478487b1f9724e8ed1d682148b4889b /source/blender/editors/space_node/drawnode.c
parent411deae9b01a77d4e21232b08595713cce220033 (diff)
Fix frame node text ignoring blank lines
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index a130436770a..ed207e2da02 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -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;
}