Skip to content

Commit 7953752

Browse files
committed
gain focus on MPL canvas click
1 parent e25aed8 commit 7953752

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/artisanlib/canvas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,7 @@ def disconnect_draggableannotations_motion_notifiers(self) -> None:
29432943
pass
29442944

29452945
def onclick(self, event:'MouseEvent') -> None:
2946-
self.aw.lcd1.setFocus() # we set the focus to the LCD1 on clicking the MPL canvas to (re-)gain focus while the event minieditor is open
2946+
self.aw.setFocus() # we set the focus to the ApplicationWindow on clicking the MPL canvas to (re-)gain focus while the event minieditor is open
29472947
try:
29482948
if self.ax is None:
29492949
return

src/artisanlib/pid.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ def getDuty(self) -> Optional[float]:
326326
if self.pidSemaphore.available() < 1:
327327
self.pidSemaphore.release(1)
328328

329-
def derivativeFilter(self) -> LiveSosFilter:
329+
@staticmethod
330+
def derivativeFilter() -> LiveSosFilter:
330331
return LiveSosFilter(
331332
scipy.signal.iirfilter(1, # order
332333
Wn=0.2, # 0 < Wn < fs/2 (fs=1 -> fs/2=0.5)

0 commit comments

Comments
 (0)