Skip to content

Commit

Permalink
Fixed curses.panel ERR on clicks in older Python+Curses versions, bum…
Browse files Browse the repository at this point in the history
…ped version number to 0.18.4
  • Loading branch information
cmang committed Mar 8, 2023
1 parent bca5ae4 commit 8bd8767
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Durdraw
_| |__ __ _____ __| |_____ _____ __ __ __
/ _ | | | __| _ | __| _ | | | |\
/_____|_____|__|__|_____|__|___\____|________| | Durr....
\_____________________________________________\| v 0.18.2
\_____________________________________________\| v 0.18.4


![durdraw-help-screen-256color](https://user-images.githubusercontent.com/261501/214016536-9413463f-2fe4-4298-8022-95daeabbe894.png)
Expand Down
15 changes: 12 additions & 3 deletions durdraw/durdraw_ui_widgets_curses.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def rebuild(self):
button.window = self.window
line += 1
self.panel = curses.panel.new_panel(self.curses_win)
self.panel.hide()
try:
self.panel.hide()
except:
pass

def show(self):
self.rebuild()
Expand Down Expand Up @@ -181,7 +184,10 @@ def refresh(self):
curses.doupdate()

def hide(self):
self.panel.hide()
try:
self.panel.hide()
except:
pass
self.refresh()
#curses_addstr(self.window, self.menu.x, self.menu.y, "Hide menu")

Expand Down Expand Up @@ -273,7 +279,10 @@ def show(self):

def hide(self):
self.panel.bottom()
self.panel.hide()
try:
self.panel.hide()
except:
pass

def move(self, x, y):
self.x = x
Expand Down
2 changes: 1 addition & 1 deletion durdraw/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def undosize(size_s):
raise argparse.ArgumentTypeError("Undo size must be between 1 and 1000.")

def main():
DUR_VER = '0.18.2'
DUR_VER = '0.18.4'
DUR_FILE_VER = 5
DEBUG_MODE = False # debug = makes debug_write available, sends more notifications
durlogo = '''
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='durdraw',
version='0.18.2',
version='0.18.4',
author='Sam Foster',
author_email='samfoster@gmail.com',
description='Animated Color ASCII and Unicode Art Editor',
Expand Down

0 comments on commit 8bd8767

Please sign in to comment.