summaryrefslogtreecommitdiffstats
path: root/src/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c
index ff85c6f..36d45a2 100644
--- a/src/module.c
+++ b/src/module.c
@@ -656,13 +656,20 @@ ganv_module_draw(GanvItem* item,
int cx, int cy,
int width, int height)
{
+ GanvNode* node = GANV_NODE(item);
GanvModule* module = GANV_MODULE(item);
- // Draw box and label
+ // Draw box
if (GANV_ITEM_CLASS(parent_class)->draw) {
(*GANV_ITEM_CLASS(parent_class)->draw)(item, cr, cx, cy, width, height);
}
+ // Draw label
+ if (node->impl->label) {
+ GanvItem* label_item = GANV_ITEM(node->impl->label);
+ GANV_ITEM_GET_CLASS(label_item)->draw(label_item, cr, cx, cy, width, height);
+ }
+
// Draw ports
FOREACH_PORT(module->impl->ports, p) {
GANV_ITEM_GET_CLASS(GANV_ITEM(*p))->draw(