소스 검색

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