Fixed leaking issues with the previous commit.
This commit is contained in:
parent
157a312e8a
commit
dda58c9323
|
@ -408,15 +408,13 @@ struct uiForm {
|
||||||
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldHorzHuggingPri, NSLayoutConstraintOrientationHorizontal);
|
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldHorzHuggingPri, NSLayoutConstraintOrientationHorizontal);
|
||||||
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldVertHuggingPri, NSLayoutConstraintOrientationVertical);
|
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldVertHuggingPri, NSLayoutConstraintOrientationVertical);
|
||||||
|
|
||||||
[fc.label removeFromSuperview];
|
[fc onDestroy];
|
||||||
|
|
||||||
[self->children removeObjectAtIndex:n];
|
[self->children removeObjectAtIndex:n];
|
||||||
|
|
||||||
[self establishOurConstraints];
|
[self establishOurConstraints];
|
||||||
if (stretchy) {
|
if (stretchy)
|
||||||
if ([self nStretchy] == 0)
|
if ([self nStretchy] == 0)
|
||||||
uiDarwinNotifyEdgeHuggingChanged(uiDarwinControl(self->f));
|
uiDarwinNotifyEdgeHuggingChanged(uiDarwinControl(self->f));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)isPadded
|
- (int)isPadded
|
||||||
|
|
|
@ -278,11 +278,12 @@ void uiFormAppend(uiForm *f, const char *label, uiControl *c, int stretchy)
|
||||||
|
|
||||||
void uiFormDelete(uiForm *f, int index)
|
void uiFormDelete(uiForm *f, int index)
|
||||||
{
|
{
|
||||||
uiControl *c;
|
struct formChild fc;
|
||||||
|
|
||||||
c = (*(f->controls))[index].c;
|
fc = (*(f->controls))[index];
|
||||||
uiControlSetParent(c, NULL);
|
uiControlSetParent(fc.c, NULL);
|
||||||
uiWindowsControlSetParentHWND(uiWindowsControl(c), NULL);
|
uiWindowsControlSetParentHWND(uiWindowsControl(fc.c), NULL);
|
||||||
|
uiWindowsEnsureDestroyWindow(fc.label);
|
||||||
f->controls->erase(f->controls->begin() + index);
|
f->controls->erase(f->controls->begin() + index);
|
||||||
formArrangeChildren(f);
|
formArrangeChildren(f);
|
||||||
uiWindowsControlMinimumSizeChanged(uiWindowsControl(f));
|
uiWindowsControlMinimumSizeChanged(uiWindowsControl(f));
|
||||||
|
|
Loading…
Reference in New Issue