Do not use record in __init__ of form widget
During the initialization of the widget, the view may not yet have a proper record. But update_img access the record of the view. Also it is safer for list-form to define the _record before calling super in case there is an access to record attribute. issue8616 review285981002
This commit is contained in:
1 parent
76550d2357
commit
7167b9224e
2 files changed
+1
-3
No files matched your search
@@ -44,8 +44,6 @@ class Image(BinaryMixin, Widget):
|
||||
|
||||
self._readonly = False
|
||||
|
||||
self.update_img()
|
||||
|
||||
@property
|
||||
def filters(self):
|
||||
filters = super(Image, self).filters
|
||||
|
||||
@@ -10,8 +10,8 @@ from .form import ViewForm
|
||||
class ListBoxViewForm(ViewForm):
|
||||
|
||||
def __init__(self, view_id, screen, xml):
|
||||
super().__init__(view_id, screen, xml)
|
||||
self._record = None
|
||||
super().__init__(view_id, screen, xml)
|
||||
self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user