"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( def closeEvent(
self, self,
event: QtGui.QCloseEvent, event: QtGui.QCloseEvent,
) -> None: ) -> None:
"""Cancel the root actor asap. '''Cancel the root actor asap.
"""
# TODO: instead kill the root tractor nursery?
'''
# raising KBI seems to get intercepted by by Qt so just use the system. # raising KBI seems to get intercepted by by Qt so just use the system.
os.kill(os.getpid(), signal.SIGINT) os.kill(os.getpid(), signal.SIGINT)
@ -226,16 +226,16 @@ class MainWindow(QtGui.QMainWindow):
def on_focus_change( def on_focus_change(
self, self,
old: QtGui.QWidget, last: QtGui.QWidget,
new: QtGui.QWidget, current: QtGui.QWidget,
) -> None: ) -> 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? # cursor left window?
name = getattr(new, 'mode_name', '') name = getattr(current, 'mode_name', '')
self.set_mode_name(name) self.set_mode_name(name)
def current_screen(self) -> QtGui.QScreen: def current_screen(self) -> QtGui.QScreen: