changeset 1e4d309ecf42 in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset&node=1e4d309ecf42
description:
Do not set cursor on not realized TreeView
issue11596
review443421003
(grafted from a999fa1af2f4a523ba9d5610a5fe5fd75bd97526)
diffstat:
tryton/gui/window/view_form/view/list.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 44f2584a9b8c -r 1e4d309ecf42 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py Sun Jul 24 23:35:45 2022 +0200
+++ b/tryton/gui/window/view_form/view/list.py Sun Jul 24 23:36:40 2022 +0200
@@ -1124,7 +1124,7 @@
def set_cursor(self, new=False, reset_view=True):
self.treeview.grab_focus()
model = self.treeview.get_model()
- if self.screen.current_record and model:
+ if self.screen.current_record and model and
self.treeview.get_realized():
path = self.screen.current_record.get_index_path(model.group)
if model.get_flags() & gtk.TREE_MODEL_LIST_ONLY:
path = (path[0],)