Fixed a flaw in the SetControl() for GTK+ Window: it forgot to unparent old children.

This commit is contained in:
Pietro Gagliardi 2014-07-15 22:34:12 -04:00
parent 0ddc060410
commit d6a8a72662
1 changed files with 3 additions and 0 deletions

View File

@ -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