Test renderer to disable start_editing on Boolean
The focus_column._type can only be 'field', 'button' or 'fill'. It is the renderer that must be tested to disable the start_editing. issue5246 review15921002
This commit is contained in:
1 parent
c3ee8e2dea
commit
044cfffaf1
1 file changed
+4
-2
@@ -102,8 +102,10 @@ class EditableTreeView(TreeView):
|
||||
|
||||
def set_cursor(self, path, focus_column=None, start_editing=False):
|
||||
self.grab_focus()
|
||||
if focus_column and (focus_column._type in ('boolean')):
|
||||
start_editing = False
|
||||
if focus_column:
|
||||
widget = self.view.get_column_widget(focus_column)
|
||||
if isinstance(widget.renderer, gtk.CellRendererToggle):
|
||||
start_editing = False
|
||||
self.scroll_to_cell(path, focus_column, use_align=False)
|
||||
super(EditableTreeView, self).set_cursor(path, focus_column,
|
||||
start_editing)
|
||||
|
||||
Reference in new issue
Block a user