"last" and "current" are better names

ordermodepps_backup
Tyler Goodlet 2021-08-03 09:45:33 -04:00
parent d0ad5e43f9
commit 5fe8cb7e53
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: