Fixed moving label on Windows.

This commit is contained in:
Pietro Gagliardi 2015-04-14 12:47:58 -04:00
parent 21f122161e
commit e9920c70c0
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,6 @@
// TODO // TODO
// - rename to uiBox // - rename to uiBox
// - on windows, removing a control from one stack and adding it to another doesn't actually move the control (just removing it works though, so...)
typedef struct stack stack; typedef struct stack stack;
typedef struct stackControl stackControl; typedef struct stackControl stackControl;
@ -355,11 +354,11 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy)
} }
s->controls[s->len].c = c; s->controls[s->len].c = c;
s->controls[s->len].stretchy = stretchy; s->controls[s->len].stretchy = stretchy;
s->len++; // must be here for parent updates to work
if (s->parent != NULL) { if (s->parent != NULL) {
uiControlSetParent(s->controls[s->len].c, s->parent); uiControlSetParent(s->controls[s->len - 1].c, s->parent);
uiParentUpdate(s->parent); uiParentUpdate(s->parent);
} }
s->len++;
} }
void uiStackRemove(uiControl *st, uintmax_t index) void uiStackRemove(uiControl *st, uintmax_t index)