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:
authorHans Goudey <h.goudey@me.com>2021-10-19 22:04:03 +0300
committerHans Goudey <h.goudey@me.com>2021-10-19 22:04:03 +0300
commit85c8dd6c968334fc8c58a1f4ba1b145996510120 (patch)
treeb04ace9c2a838697e29cf5eb69fc8e7ece3e245c /source/blender/editors/space_node/drawnode.cc
parentfccc530003be62bcfafc15ed73aa01bbf443af52 (diff)
Fix: Display color sockets without labels correctly
Don't build a manual property split layout when the label for the socket is hidden.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.cc')
-rw-r--r--source/blender/editors/space_node/drawnode.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index f7231df85a0..afe36922b09 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -3577,9 +3577,14 @@ static void std_node_socket_draw(
}
break;
case SOCK_RGBA: {
- uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
- uiItemL(row, text, 0);
- uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ if (text[0] == '\0') {
+ uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ }
+ else {
+ uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
+ uiItemL(row, text, 0);
+ uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ }
break;
}
case SOCK_STRING: {