diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-15 22:34:12 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-15 22:34:12 -0400 |
| commit | d6a8a72662f7ef5f73962967aff1423183c598cb (patch) | |
| tree | 3421d473d222f65f884eb0f1cc4a6606dcb0230a | |
| parent | 0ddc06041003309d1649a0f50c9b28cd2bc3005a (diff) | |
Fixed a flaw in the SetControl() for GTK+ Window: it forgot to unparent old children.
| -rw-r--r-- | redo/window_unix.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/redo/window_unix.go b/redo/window_unix.go index 3992443..f110e5f 100644 --- a/redo/window_unix.go +++ b/redo/window_unix.go @@ -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 |
