mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
removed list update_value and move the code to set_entity_value
This commit is contained in:
parent
2cd6a40200
commit
37110d9b9a
1 changed files with 7 additions and 12 deletions
|
|
@ -218,10 +218,14 @@ class ListWidget(InputWidget):
|
|||
|
||||
self.entity_widget.add_widget_to_layout(self, entity_label)
|
||||
|
||||
self.update_value()
|
||||
|
||||
def set_entity_value(self):
|
||||
print("set_entity_value", self.__class__.__name__, self.entity.path)
|
||||
for input_field in tuple(self.input_fields):
|
||||
self.remove_row(input_field)
|
||||
|
||||
for entity in self.entity.children:
|
||||
self.add_row(entity)
|
||||
|
||||
self.empty_row.setVisible(self.count() == 0)
|
||||
|
||||
def _on_value_change(self):
|
||||
print("_on_value_change", self.__class__.__name__, self.entity.path)
|
||||
|
|
@ -232,15 +236,6 @@ class ListWidget(InputWidget):
|
|||
def count(self):
|
||||
return len(self.input_fields)
|
||||
|
||||
def update_value(self):
|
||||
for input_field in tuple(self.input_fields):
|
||||
self.remove_row(input_field)
|
||||
|
||||
for entity in self.entity.children:
|
||||
self.add_row(entity)
|
||||
|
||||
self.empty_row.setVisible(self.count() == 0)
|
||||
|
||||
def swap_rows(self, row_1, row_2):
|
||||
if row_1 == row_2:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue