Skip to content

Commit

Permalink
ShowSpells: don't recalc the button count each iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
lynxlynxlynx committed Jun 28, 2017
1 parent 28267e7 commit 813faec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gemrb/GUIScripts/LUSpellSelection.py
Expand Up @@ -424,7 +424,8 @@ def ShowSpells ():
j = RowIndex()

# we have a grid of 24 spells
for i in range (ButtonCount + ExtraSpellButtons()):
extraButtons = ExtraSpellButtons ()
for i in range (ButtonCount + extraButtons):
# ensure we can learn this many spells
SpellButton = SpellsWindow.GetControl (i+SpellStart)
if i + j >= len (Spells[SpellLevel]):
Expand Down

0 comments on commit 813faec

Please sign in to comment.