"last" and "current" are better names

fsp_feeds
Tyler Goodlet 2021-08-03 09:45:33 -04:00
parent deedcb2c4a
commit b79b9c8c41
1 changed files with 9 additions and 9 deletions

View File

@ -185,13 +185,13 @@ class MainWindow(QtGui.QMainWindow):
def closeEvent(
self,
event: QtGui.QCloseEvent,
) -> None:
"""Cancel the root actor asap.
"""
# TODO: instead kill the root tractor nursery?
'''Cancel the root actor asap.
'''
# raising KBI seems to get intercepted by by Qt so just use the system.
os.kill(os.getpid(), signal.SIGINT)
@ -226,16 +226,16 @@ class MainWindow(QtGui.QMainWindow):
def on_focus_change(
self,
old: QtGui.QWidget,
new: QtGui.QWidget,
last: QtGui.QWidget,
current: QtGui.QWidget,
) -> None:
log.debug(f'widget focus changed from {old} -> {new}')
log.info(f'widget focus changed from {last} -> {current}')
if new is not None:
if current is not None:
# cursor left window?
name = getattr(new, 'mode_name', '')
name = getattr(current, 'mode_name', '')
self.set_mode_name(name)
def current_screen(self) -> QtGui.QScreen: