1. Alain Leufroy
  2. limma


Alain Leufroy  committed 99f85a5

[gui.qt] item: emit the edited signal only if the item has been processed. (related #624482)

  • Participants
  • Parent commits 8ea326c
  • Branches default

Comments (0)

Files changed (1)

File ui/gui/qt/item.py

View file
         :title: label of the item
         super(Item, self).__init__(*ags, **kws)
+        self._processed = False
         self._ui.actions.setText(unicode(title or ''))
     def append(self, widget):
         """Add an alement ``widget`` to the end of this box layout."""
-        widget.edited.connect(self.edited.emit)
+        widget.edited.connect(self._emit_edited)
     def delete(self):
         """ask for item deletion."""
         for element in self._elements:
             yield element
+    def _emit_edited(self, element):
+        """Emit ``edited`` signal if the item was already processed."""
+        if self._processed:
+            self.edited.emit(element)
 # used for tests