fix fav PsIndex out of index

This commit is contained in:
cuu 2018-06-02 23:40:30 +08:00
parent 6289a73e20
commit 0c43b33b2a
3 changed files with 11 additions and 2 deletions

View File

@ -56,8 +56,7 @@ class BSlider(Slider):
scale.Adjust(0,0,82,63,0)
self._Icons["scale"] = scale
def SetValue(self,brt):#pct 0-100
def SetValue(self,brt):
self._Value = brt
def Further(self):
@ -89,6 +88,7 @@ class BSlider(Slider):
icon_idx = self._Value - 1
if icon_idx < 0:
icon_idx = 0
self._Icons["scale"]._IconIndex = icon_idx
self._Icons["scale"].Draw()
"""

View File

@ -292,6 +292,12 @@ class FavListPage(Page):
def Click(self):
if len(self._MyList) == 0:
return
if self._PsIndex > len(self._MyList) - 1:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._MyType == ICON_TYPES["DIR"]:

View File

@ -317,6 +317,9 @@ class RomListPage(Page):
if len(self._MyList) == 0:
return
if self._PsIndex > len(self._MyList) - 1:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._MyType == ICON_TYPES["DIR"]: