Clear menu pads before putting the new text in them, see #15

This commit is contained in:
Nicolas Margulies 2020-11-20 16:05:21 +01:00
parent 8a85f58261
commit 62599ea72c
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ class MenuDisplay(Display):
if self.height - 2 >= self.trueheight - self.menu.position else 0
# Menu box
self.menubox.clear()
self.menubox.addstr(0, 0, "" + "" * (self.width - 2) + "")
for i in range(1, self.height - 1):
self.menubox.addstr(i, 0, "" + " " * (self.width - 2) + "")
@ -43,6 +44,7 @@ class MenuDisplay(Display):
self.menubox.refresh(0, 0, self.y, self.x,
self.height + self.y,
self.width + self.x)
self.pad.clear()
self.update_pad()
self.pad.refresh(cornery, 0, self.y + 1, self.x + 2,
self.height - 2 + self.y,