From da2ad417a0debd3e6c35333ccab3fd76daa72ddc Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 28 Apr 2015 21:35:29 -0400 Subject: [PATCH] Fixed the same oversight as the previous commit on the Windows and OS X backends. Added comments to document the oversight. --- new/darwin/container.m | 5 +++++ new/unix/container.c | 1 + new/windows/container.c | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/new/darwin/container.m b/new/darwin/container.m index d398c900..4f920f81 100644 --- a/new/darwin/container.m +++ b/new/darwin/container.m @@ -112,6 +112,9 @@ static void containerShow(uiControl *cc) containerView *c = (containerView *) (cc->Internal); [c setHidden:NO]; + // hidden controls don't count in boxes and grids + if (c.containerParent != NULL) + uiContainerUpdate(c.containerParent); c.containerHidden = 0; } @@ -120,6 +123,8 @@ static void containerHide(uiControl *cc) containerView *c = (containerView *) (cc->Internal); [c setHidden:YES]; + if (c.containerParent != NULL) + uiContainerUpdate(c.containerParent); c.containerHidden = 1; } diff --git a/new/unix/container.c b/new/unix/container.c index 44181adf..5cdaffd6 100644 --- a/new/unix/container.c +++ b/new/unix/container.c @@ -177,6 +177,7 @@ static void containerShow(uiControl *cc) // don't use gtk_widget_show_all(); that'll show every widget, including ones hidden by the user gtk_widget_show(GTK_WIDGET(c)); + // hidden controls don't count in boxes and grids if (c->parent != NULL) uiContainerUpdate(c->parent); c->hidden = 0; diff --git a/new/windows/container.c b/new/windows/container.c index 643d5cc0..6ec780cc 100644 --- a/new/windows/container.c +++ b/new/windows/container.c @@ -178,6 +178,9 @@ static void containerShow(uiControl *cc) struct container *c = (struct container *) (cc->Internal); ShowWindow(c->hwnd, SW_SHOW); + // hidden controls don't count in boxes and grids + if (c->parent != NULL) + uiContainerUpdate(c->parent); c->hidden = 0; } @@ -186,6 +189,8 @@ static void containerHide(uiControl *cc) struct container *c = (struct container *) (cc->Internal); ShowWindow(c->hwnd, SW_HIDE); + if (c->parent != NULL) + uiContainerUpdate(c->parent); c->hidden = 1; }