Fixed a small bug in stack.c. Unrelated to the previous commit; that one is that the uiParentUpdate() isn't updating...?
This commit is contained in:
parent
6185187506
commit
bbc170ac49
|
@ -365,12 +365,13 @@ void uiStackRemove(uiControl *st, uintmax_t index)
|
||||||
{
|
{
|
||||||
stack *s = (stack *) (st->data);
|
stack *s = (stack *) (st->data);
|
||||||
uiControl *removed;
|
uiControl *removed;
|
||||||
uintmax_t nAfter;
|
uintmax_t i;
|
||||||
|
|
||||||
removed = s->controls[index].c;
|
removed = s->controls[index].c;
|
||||||
nAfter = s->len - index - 1;
|
// TODO switch to memmove?
|
||||||
// TODO make sure this is correct
|
for (i = index; i < s->len - 1; i++)
|
||||||
memmove(&(s->controls[index + 1]), &(s->controls[index]), nAfter * sizeof (stackControl));
|
s->controls[i] = s->controls[i + 1];
|
||||||
|
// TODO memset the last one to NULL
|
||||||
s->len--;
|
s->len--;
|
||||||
if (s->parent != NULL) {
|
if (s->parent != NULL) {
|
||||||
uiControlSetParent(removed, NULL);
|
uiControlSetParent(removed, NULL);
|
||||||
|
|
Loading…
Reference in New Issue