Fixed a flaw in the SetControl() for GTK+ Window: it forgot to unparent old children.
This commit is contained in:
parent
0ddc060410
commit
d6a8a72662
|
@ -68,6 +68,9 @@ func (w *window) SetControl(control Control) *Request {
|
|||
c := make(chan interface{})
|
||||
return &Request{
|
||||
op: func() {
|
||||
if w.child != nil { // unparent existing control
|
||||
w.child.unparent()
|
||||
}
|
||||
control.unparent()
|
||||
control.parent(w)
|
||||
w.child = control
|
||||
|
|
Loading…
Reference in New Issue