Skip to content

Commit fb8ff3e

Browse files
committed
Restore focus from cell par "a" only when possible.
On Windows the previous focus owner is None therefore the focus cannot be restored.
1 parent 43fd481 commit fb8ff3e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

diffpy/pdfgui/gui/phaseconfigurepanel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ def refresh(self):
266266
self.__this_is_first_refresh = False
267267
focusowner = self.textCtrlA.FindFocus()
268268
wx.CallAfter(self.textCtrlA.SetFocus)
269-
wx.CallAfter(focusowner.SetFocus)
269+
if focusowner is not None:
270+
wx.CallAfter(focusowner.SetFocus)
270271
return
271272

272273
def restrictConstrainedParameters(self):

0 commit comments

Comments
 (0)