From df376a5e0bcdb5325512fb182cd7a5545fb407c5 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 11 May 2015 12:16:28 -0400 Subject: [PATCH] Started to optimize container updating. Removed container updates from each new control set parent. --- darwin/newcontrol.m | 4 ---- unix/newcontrol.c | 4 ---- windows/newcontrol.c | 4 ---- 3 files changed, 12 deletions(-) diff --git a/darwin/newcontrol.m b/darwin/newcontrol.m index 276e9b13..31a7b1ae 100644 --- a/darwin/newcontrol.m +++ b/darwin/newcontrol.m @@ -46,10 +46,6 @@ static void singleSetParent(uiControl *c, uiContainer *parent) parentView = (NSView *) uiControlHandle(uiControl(s->parent)); [parentView addSubview:s->immediate]; } - if (oldparent != NULL) - uiContainerUpdate(oldparent); - if (s->parent != NULL) - uiContainerUpdate(s->parent); } // also good for NSBox and NSProgressIndicator diff --git a/unix/newcontrol.c b/unix/newcontrol.c index d53b8d9a..8ca8c8ae 100644 --- a/unix/newcontrol.c +++ b/unix/newcontrol.c @@ -49,10 +49,6 @@ static void singleSetParent(uiControl *c, uiContainer *parent) newcontainer = GTK_CONTAINER(uiControlHandle(uiControl(s->parent))); gtk_container_add(newcontainer, s->immediate); } - if (oldparent != NULL) - uiContainerUpdate(oldparent); - if (s->parent != NULL) - uiContainerUpdate(s->parent); } static void singlePreferredSize(uiControl *c, uiSizing *d, intmax_t *width, intmax_t *height) diff --git a/windows/newcontrol.c b/windows/newcontrol.c index 53477b78..1b4c19f1 100644 --- a/windows/newcontrol.c +++ b/windows/newcontrol.c @@ -45,10 +45,6 @@ static void singleSetParent(uiControl *c, uiContainer *parent) newParentHWND = (HWND) uiControlHandle(uiControl(s->parent)); if (SetParent(s->hwnd, newParentHWND) == NULL) logLastError("error setting control parent in singleSetParent()"); - if (oldparent != NULL) - uiContainerUpdate(oldparent); - if (s->parent != NULL) - uiContainerUpdate(s->parent); } static void singleResize(uiControl *c, intmax_t x, intmax_t y, intmax_t width, intmax_t height, uiSizing *d)