Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: 1c79c6e2 by Cédric Krier at 2022-12-31T01:03:37+01:00 Do not fail trying to grab focus on GooCanvas GooCanvas.Canvas.grab_focus takes a GooCanvasItem which we do not have when grabbing the focus when destroying NoModal. Closes #11977 - - - - - 1 changed file: - tryton/tryton/gui/window/nomodal.py Changes: ===================================== tryton/tryton/gui/window/nomodal.py ===================================== @@ -32,7 +32,11 @@ self.sensible_widget.props.sensitive = True for focus in self.parent_focus: if focus and focus.is_ancestor(self.parent): - focus.grab_focus() + try: + focus.grab_focus() + except TypeError: + # GooCanvas needs a GooCanvasItem + continue break def default_size(self): View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/1c79c6e2de4984100dcbc6cf80f6124a47575ad3 -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/1c79c6e2de4984100dcbc6cf80f6124a47575ad3 You're receiving this email because of your account on foss.heptapod.net.