Explorar o código

fixed gui.Scroller.Clear() method

leonsal %!s(int64=8) %!d(string=hai) anos
pai
achega
69f1119734
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      gui/scroller.go

+ 3 - 0
gui/scroller.go

@@ -68,9 +68,12 @@ func newScroller(vert bool, width, height float32) *Scroller {
 func (s *Scroller) Clear() {
 
 	s.Panel.DisposeChildren(true)
+	s.first = 0
 	s.hscroll = nil
 	s.vscroll = nil
 	s.items = s.items[0:0]
+	s.update()
+	s.recalc()
 }
 
 // Len return the number of items in the scroller