Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion meshroom/core/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ def attributeFactory(description, value, isOutput, node, root=None, parent=None)
else:
attr.resetToDefaultValue()

attr.valueChanged.connect(lambda attr=attr: node._onAttributeChanged(attr))
# Only connect slot that reacts to value change once initial value has been set.
# NOTE: This should be handled by the Node class, but we're currently limited by our core
# signal implementation that does not support emitting parameters.
# And using a lambda here to send the attribute as a parameter causes
# performance issues when using the pyside backend.
attr.valueChanged.connect(attr._onValueChanged)

return attr

Expand Down Expand Up @@ -213,6 +218,10 @@ def _set_value(self, value):
self.valueChanged.emit()
self.validValueChanged.emit()

@Slot()
def _onValueChanged(self):
self.node._onAttributeChanged(self)

def _set_label(self, label):
if self._label == label:
return
Expand Down