Commits

Alain Leufroy committed 99f85a5

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

Comments (0)

Files changed (1)

ui/gui/qt/item.py

         :title: label of the item
         """
         super(Item, self).__init__(*ags, **kws)
+        self._processed = False
         self._ui.actions.setText(unicode(title or ''))
         self._setup_actions()
 
     def append(self, widget):
         """Add an alement ``widget`` to the end of this box layout."""
         self._ui.elements.addWidget(widget)
-        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