Do not set cursor on not realized TreeView
issue11596 review443421003 (grafted from a999fa1af2f4a523ba9d5610a5fe5fd75bd97526) --HG-- branch : 6.0
This commit is contained in:
1 parent
f6fd7fa4f7
commit
bca00202c5
1 file changed
+1
-1
@@ -1142,7 +1142,7 @@ class ViewTree(View):
|
||||
def set_cursor(self, new=False, reset_view=True):
|
||||
self.treeview.grab_focus()
|
||||
model = self.treeview.get_model()
|
||||
if self.record and model:
|
||||
if self.record and model and self.treeview.get_realized():
|
||||
path = self.record.get_index_path(model.group)
|
||||
if model.get_flags() & Gtk.TreeModelFlags.LIST_ONLY:
|
||||
path = (path[0],)
|
||||
|
||||
Reference in new issue
Block a user