瀏覽代碼

fixed gui.Scroller.Clear() method

leonsal 8 年之前
父節點
當前提交
69f1119734
共有 1 個文件被更改,包括 3 次插入0 次删除
  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