summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-02 21:41:45 -0400
committerDavid Robillard <d@drobilla.net>2016-10-02 21:41:45 -0400
commit3f89dacefc55b94e7188c8ba919c9c700599bcf8 (patch)
tree307c7188b23598e54ec1d1a7de190960f3181743 /src
parent84960435d40ed4726d17e5fe4ab5caac791ec2e5 (diff)
downloadganv-3f89dacefc55b94e7188c8ba919c9c700599bcf8.tar.gz
ganv-3f89dacefc55b94e7188c8ba919c9c700599bcf8.tar.bz2
ganv-3f89dacefc55b94e7188c8ba919c9c700599bcf8.zip
Make ganv_port_show_control() idempotent
Diffstat (limited to 'src')
-rw-r--r--src/port.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/port.c b/src/port.c
index aeca543..4e11b18 100644
--- a/src/port.c
+++ b/src/port.c
@@ -495,6 +495,10 @@ ganv_port_set_direction(GanvPort* port,
void
ganv_port_show_control(GanvPort* port)
{
+ if (port->impl->control) {
+ return;
+ }
+
const guint color = 0xFFFFFF66;
const double border_width = GANV_NODE(port)->impl->border_width;
@@ -503,7 +507,7 @@ ganv_port_show_control(GanvPort* port)
control->value = 0.0f;
control->min = 0.0f;
- control->max = 0.0f;
+ control->max = 1.0f;
control->is_toggle = FALSE;
control->is_integer = FALSE;
control->rect = GANV_BOX(