Do nothing on_start_editing binary if event is None
issue2368 review206007
This commit is contained in:
1 parent
5b7f14eaa9
commit
6432e2b435
1 file changed
+3
-1
@@ -74,6 +74,8 @@ class CellRendererBinary(gtk.GenericCellRenderer):
|
||||
|
||||
def on_start_editing(self, event, widget, path, background_area,
|
||||
cell_area, flags):
|
||||
if event is None:
|
||||
return
|
||||
button_width = self.button_width()
|
||||
|
||||
for index, button_name in enumerate(self.buttons):
|
||||
@@ -92,7 +94,7 @@ class CellRendererBinary(gtk.GenericCellRenderer):
|
||||
return
|
||||
if not self.size and button_name == 'save':
|
||||
return
|
||||
if event is None or event.type == gtk.gdk.BUTTON_PRESS:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS:
|
||||
self.clicking = button_name
|
||||
self.emit(button_name, path)
|
||||
|
||||
|
||||
Reference in new issue
Block a user