mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #1671 from pypeclub/bugfix/list_appending_fix
Settings list race condifiton and mutable dict list conversion
This commit is contained in:
commit
3122ddfb2e
2 changed files with 7 additions and 2 deletions
|
|
@ -467,7 +467,7 @@ class DictMutableKeysEntity(EndpointEntity):
|
|||
if self.store_as_list:
|
||||
output = []
|
||||
for key, child_entity in self.children_by_key.items():
|
||||
output.append(key, child_entity.value)
|
||||
output.append([key, child_entity.value])
|
||||
return output
|
||||
|
||||
output = {}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ class ListItem(QtWidgets.QWidget):
|
|||
self.input_field = self.create_ui_for_entity(
|
||||
self.category_widget, self.entity, self
|
||||
)
|
||||
self.input_field.set_entity_value()
|
||||
|
||||
spacer_widget = QtWidgets.QWidget(self)
|
||||
spacer_widget.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||
|
|
@ -337,6 +336,12 @@ class ListWidget(InputWidget):
|
|||
self.content_layout.insertWidget(row + 1, item_widget)
|
||||
self.input_fields.insert(row, item_widget)
|
||||
|
||||
# Change to entity value after item is added to `input_fields`
|
||||
# - may cause recursion error as setting a value may cause input field
|
||||
# change which will trigger this validation if entity is already
|
||||
# added as widget here which won't because is not in input_fields
|
||||
item_widget.input_field.set_entity_value()
|
||||
|
||||
if previous_field:
|
||||
previous_field.order_changed()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue