diff options
author | David Robillard <d@drobilla.net> | 2012-04-23 00:02:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-23 00:02:42 +0000 |
commit | f77f74472a6e46c0af101e7f1d52635c0147efd9 (patch) | |
tree | 8f883953ef1b981570c4075f05fb05a46e86456b /src/module.c | |
parent | 91c3158e31fb55b55eb75951e6e32b4ba5edce93 (diff) | |
download | ganv-f77f74472a6e46c0af101e7f1d52635c0147efd9.tar.gz ganv-f77f74472a6e46c0af101e7f1d52635c0147efd9.tar.bz2 ganv-f77f74472a6e46c0af101e7f1d52635c0147efd9.zip |
Resize modules when port labels change.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4242 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/module.c')
-rw-r--r-- | src/module.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/module.c b/src/module.c index 4b319bc..cebd458 100644 --- a/src/module.c +++ b/src/module.c @@ -66,7 +66,6 @@ ganv_module_init(GanvModule* module) impl->widest_output = 0.0; impl->show_port_labels = FALSE; impl->must_resize = TRUE; - impl->port_size_changed = FALSE; } static void @@ -108,7 +107,6 @@ ganv_module_set_property(GObject* object, const gboolean tmp = g_value_get_boolean(value); if (impl->show_port_labels != tmp) { impl->show_port_labels = tmp; - impl->port_size_changed = TRUE; impl->must_resize = TRUE; /* FIXME FOREACH_PORT_CONST(gobj()->ports, p) { @@ -474,10 +472,7 @@ layout(GanvNode* self) ganv_box_set_width(GANV_BOX(module), label_w + (MODULE_LABEL_PAD * 2.0)); ganv_box_set_height(GANV_BOX(module), label_h); - if (impl->port_size_changed) { - measure_ports(module); - impl->port_size_changed = FALSE; - } + measure_ports(module); switch (canvas->direction) { case GANV_DIRECTION_RIGHT: @@ -496,9 +491,7 @@ ganv_module_resize(GanvNode* self) { GanvModule* module = GANV_MODULE(self); - if (module->impl->must_resize) { - layout(self); - } + layout(self); if (parent_class->parent_class.resize) { parent_class->parent_class.resize(self); |