Explorar el Código

fixed gui.Scroller.Clear() method

leonsal hace 8 años
padre
commit
69f1119734
Se han modificado 1 ficheros con 3 adiciones y 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