Test if widget_tree is on current_view before using it as color widget of Many2Many for issue1481

This commit is contained in:
Cédric Krier committed 2010-04-03 14:26:46 +02:00
1 parent 47f9c01a9c
commit a184184b96
1 file changed
+3 -1
@@ -70,7 +70,9 @@ class Many2Many(WidgetInterface):
self.wid_text.connect('key_press_event', self.on_keypress)
def _color_widget(self):
return self.screen.current_view.widget_tree
if hasattr(self.screen.current_view, 'widget_tree'):
return self.screen.current_view.widget_tree
return super(Many2Many, self)._color_widget()
def grab_focus(self):
return self.wid_text.grab_focus()