From 1fe7831cb8e310b63122f91480b4460dcb6e4a77 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 15 Aug 2014 19:32:49 -0400 Subject: [PATCH] Moved Grid back. Removed now-unused stack.created. --- redo/{mergeback => }/grid.go | 0 redo/stack.go | 5 ----- 2 files changed, 5 deletions(-) rename redo/{mergeback => }/grid.go (100%) diff --git a/redo/mergeback/grid.go b/redo/grid.go similarity index 100% rename from redo/mergeback/grid.go rename to redo/grid.go diff --git a/redo/stack.go b/redo/stack.go index b0f9b0a..0bd587a 100644 --- a/redo/stack.go +++ b/redo/stack.go @@ -27,7 +27,6 @@ type Stack interface { } type stack struct { - created bool orientation orientation controls []Control stretchy []bool @@ -55,9 +54,6 @@ func NewVerticalStack(controls ...Control) Stack { } func (s *stack) SetStretchy(index int) { - if s.created { - panic("call to Stack.SetStretchy() after Stack has been created") - } if index < 0 || index > len(s.stretchy) { panic(fmt.Errorf("index %d out of range in Stack.SetStretchy()", index)) } @@ -68,7 +64,6 @@ func (s *stack) setParent(parent *controlParent) { for _, c := range s.controls { c.setParent(parent) } - s.created = true } func (s *stack) allocate(x int, y int, width int, height int, d *sizing) (allocations []*allocation) {