changeset bbccd7a49294 in tryton:6.0
details: https://hg.tryton.org/tryton?cmd=changeset&node=bbccd7a49294
description:
        Never update counter label if widget has been removed

        On Windows it triggers a SIGSEGV.

        issue11395
        review423491003
        (grafted from d0764ce2fbebd20fdbcf6177fa51c6f9e3293755)
diffstat:

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

diffs (12 lines):

diff -r 204bd7c9b3e6 -r bbccd7a49294 
tryton/gui/window/view_form/view/form_gtk/state_widget.py
--- a/tryton/gui/window/view_form/view/form_gtk/state_widget.py Fri May 06 
23:28:08 2022 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/state_widget.py Sun Jul 24 
23:32:56 2022 +0200
@@ -193,7 +193,7 @@
                         counter=counter, label=label))
 
     def _set_count(self, value, idx=0, current=None, counter=None, label=''):
-        if current != self._current and not self.get_parent():
+        if current != self._current or not self.get_parent():
             return
         try:
             counter[idx] = value()

Reply via email to