mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-06-27 07:30:29 -04:00
Added error handling to micron parser mouse event translator. Fixes #32.
This commit is contained in:
parent
22a7acf259
commit
34b3987ded
1 changed files with 36 additions and 32 deletions
|
@ -751,6 +751,7 @@ class LinkableText(urwid.Text):
|
||||||
return x, y
|
return x, y
|
||||||
|
|
||||||
def mouse_event(self, size, event, button, x, y, focus):
|
def mouse_event(self, size, event, button, x, y, focus):
|
||||||
|
try:
|
||||||
if button != 1 or not is_mouse_press(event):
|
if button != 1 or not is_mouse_press(event):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
@ -789,3 +790,6 @@ class LinkableText(urwid.Text):
|
||||||
self._emit("change")
|
self._emit("change")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return False
|
Loading…
Add table
Add a link
Reference in a new issue