Skip to content

Commit

Permalink
Fixed bug where you could open editors for columns and rows 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaid committed Nov 29, 2019
1 parent 7413819 commit 2de3c3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions window.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,10 @@ def save_layout(self):

def click(self, event):
gap = int(BUTTON_SIZE // 4)

column = int(event.x // (BUTTON_SIZE + gap))
row = int(event.y // (BUTTON_SIZE + gap))


column = min(8, int(event.x // (BUTTON_SIZE + gap)))
row = min(8, int(event.y // (BUTTON_SIZE + gap)))

if self.grid_drawn:
if(column, row) == (8, 0):
Expand Down

0 comments on commit 2de3c3b

Please sign in to comment.