mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
add wrapper to layout on add of first child in wrapper
This commit is contained in:
parent
708d296d4b
commit
eff4dbf077
1 changed files with 4 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ class DictImmutableKeysWidget(BaseWidget):
|
|||
|
||||
self.widget_mapping = {}
|
||||
self.wrapper_widgets_by_id = {}
|
||||
self._added_wrapper_ids = set()
|
||||
self._prepare_entity_layouts(
|
||||
self.entity.gui_layout, self.content_widget
|
||||
)
|
||||
|
|
@ -72,7 +73,6 @@ class DictImmutableKeysWidget(BaseWidget):
|
|||
|
||||
self.widget_mapping[wrapper.id] = widget
|
||||
self.wrapper_widgets_by_id[wrapper.id] = wrapper
|
||||
self.add_widget_to_layout(wrapper)
|
||||
self._prepare_entity_layouts(child["children"], wrapper)
|
||||
|
||||
def _ui_item_without_label(self):
|
||||
|
|
@ -151,6 +151,9 @@ class DictImmutableKeysWidget(BaseWidget):
|
|||
wrapper = self.widget_mapping[map_id]
|
||||
if wrapper is not self.content_widget:
|
||||
wrapper.add_widget_to_layout(widget, label)
|
||||
if wrapper.id not in self._added_wrapper_ids:
|
||||
self.add_widget_to_layout(wrapper)
|
||||
self._added_wrapper_ids.add(wrapper.id)
|
||||
return
|
||||
|
||||
row = self.content_layout.rowCount()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue