equal
deleted
inserted
replaced
270 |
270 |
271 def GetShortcutKeyCallbackFunction(viewer_function): |
271 def GetShortcutKeyCallbackFunction(viewer_function): |
272 def ShortcutKeyFunction(self, event): |
272 def ShortcutKeyFunction(self, event): |
273 control = self.FindFocus() |
273 control = self.FindFocus() |
274 if control is not None and control.GetName() in ["Viewer", "TextViewer"]: |
274 if control is not None and control.GetName() in ["Viewer", "TextViewer"]: |
275 getattr(control.Parent, viewer_function)() |
275 getattr(control.ParentWindow, viewer_function)() |
276 elif isinstance(control, wx.stc.StyledTextCtrl): |
276 elif isinstance(control, wx.stc.StyledTextCtrl): |
277 getattr(control, viewer_function)() |
277 getattr(control, viewer_function)() |
278 elif isinstance(control, wx.TextCtrl): |
278 elif isinstance(control, wx.TextCtrl): |
279 control.ProcessEvent(event) |
279 control.ProcessEvent(event) |
280 return ShortcutKeyFunction |
280 return ShortcutKeyFunction |