Reviewers: ,
Please review this at http://codereview.tryton.org/501005/
Affected files:
M tryton/gui/window/view_form/view/form.py
M tryton/gui/window/view_form/view/form_gtk/binary.py
M tryton/gui/window/view_form/view/form_gtk/many2one.py
M tryton/gui/window/view_form/view/form_gtk/selection.py
Index: tryton/gui/window/view_form/view/form.py
===================================================================
--- a/tryton/gui/window/view_form/view/form.py
+++ b/tryton/gui/window/view_form/view/form.py
@@ -84,10 +84,6 @@
field = record.group.fields[name]
for widget in widgets:
widget.set_value(record, field)
- # The states of group must be restored as some widgets could call
- # display in set_value
- for button in self.buttons:
- button.state_set(record)
def sel_ids_get(self):
if self.screen.current_record:
Index: tryton/gui/window/view_form/view/form_gtk/binary.py
===================================================================
--- a/tryton/gui/window/view_form/view/form_gtk/binary.py
+++ b/tryton/gui/window/view_form/view/form_gtk/binary.py
@@ -120,7 +120,6 @@
if self.filename_field:
self.filename_field.set_client(self.record,
os.path.basename(filename))
- self.display(self.record, self.field)
def sig_open(self, widget=None):
if not self.filename_field:
@@ -150,7 +149,6 @@
def sig_remove(self, widget=None):
self.field.set_client(self.record, False)
- self.display(self.record, self.field)
def sig_key_press(self, widget, event, *args):
editable = self.wid_text and self.wid_text.get_editable()
Index: tryton/gui/window/view_form/view/form_gtk/many2one.py
===================================================================
--- a/tryton/gui/window/view_form/view/form_gtk/many2one.py
+++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py
@@ -164,7 +164,6 @@
self.field.set_client(self.record,
self.value_from_id(ids[0]), force_change=True)
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
return
@@ -173,7 +172,6 @@
self.field.set_client(self.record,
self.value_from_id(*result[0]),
force_change=True)
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
WinSearch(model, callback, sel_multi=False,
@@ -183,7 +181,6 @@
new=self.but_new.get_property('sensitive'))
return
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
return
@@ -206,7 +203,6 @@
self.field.set_client(self.record,
self.value_from_id(screen.current_record.id,
screen.current_record.rec_name()))
- self.display(self.record, self.field)
self.focus_out = True
WinForm(screen, callback, new=True, save_current=True)
@@ -232,7 +228,6 @@
screen.current_record.rec_name()),
force_change=True)
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
WinForm(screen, callback, save_current=True)
return
@@ -258,7 +253,6 @@
self.field.set_client(self.record,
self.value_from_id(ids[0]),
force_change=True)
self.focus_out = True
- self.display(self.record, self.field)
return True
def callback(result):
@@ -266,7 +260,6 @@
self.field.set_client(self.record,
self.value_from_id(*result[0]), force_change=True)
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
WinSearch(model, callback, sel_multi=False,
ids=ids, context=context, domain=domain,
@@ -275,7 +268,6 @@
new=self.but_new.get_property('sensitive'))
return
self.focus_out = True
- self.display(self.record, self.field)
self.changed = True
return
@@ -309,7 +301,6 @@
position = self.wid_text.get_position()
self.field.set_client(self.record,
self.value_from_id(None, ''))
- self.display(self.record, self.field)
# Restore text and position after display
self.wid_text.set_text(text)
self.wid_text.set_position(position)
Index: tryton/gui/window/view_form/view/form_gtk/selection.py
===================================================================
--- a/tryton/gui/window/view_form/view/form_gtk/selection.py
+++ b/tryton/gui/window/view_form/view/form_gtk/selection.py
@@ -142,7 +142,6 @@
if not self.field:
return
self.field.set_client(self.record, self.value_get())
- self.display(self.record, self.field)
@property
def modified(self):
--
[email protected] mailing list