changeset a6ff0a4da00e in tryton:6.0
details: https://hg.tryton.org/tryton?cmd=changeset&node=a6ff0a4da00e
description:
        Set value on focus out for calendar widgets

        We can not rely only on *-changed events to set the value because if 
the user
        has typed the date in the exact format, the date-time widgets do not 
emit a
        *-changed event.

        issue11815
        review425961003
        (grafted from 137038265d959e4e41a7c5e7da0db14e93f47e0a)
diffstat:

 tryton/gui/window/view_form/view/form_gtk/calendar_.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 55372bdd73a7 -r a6ff0a4da00e 
tryton/gui/window/view_form/view/form_gtk/calendar_.py
--- a/tryton/gui/window/view_form/view/form_gtk/calendar_.py    Mon Oct 17 
23:40:19 2022 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/calendar_.py    Sat Oct 22 
01:05:13 2022 +0200
@@ -25,6 +25,8 @@
         self.real_entry.connect('key_press_event', self.sig_key_press)
         self.real_entry.connect('activate', self.sig_activate)
         self.real_entry.connect('changed', lambda _: self.send_modified())
+        self.real_entry.connect(
+            'focus-out-event', lambda *a: self._focus_out())
         self.entry.connect(self._changed_signal, self.changed)
         self.widget.pack_start(self.entry, expand=False, fill=False, padding=0)
 

Reply via email to