mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
remove items from _report_items_by_id and _items_by_id
This commit is contained in:
parent
f7fba84aee
commit
78460c2d38
1 changed files with 5 additions and 7 deletions
|
|
@ -435,15 +435,13 @@ class LoadedFilesModel(QtGui.QStandardItemModel):
|
|||
root_item.appendRows(new_items)
|
||||
|
||||
def remove_item_by_id(self, item_id):
|
||||
report_item = self._report_items_by_id.get(item_id)
|
||||
if not report_item:
|
||||
return
|
||||
|
||||
self._handler.remove_report_item(item_id)
|
||||
item = self._items_by_id.get(item_id)
|
||||
|
||||
parent = self.invisibleRootItem()
|
||||
parent.removeRow(item.row())
|
||||
self._report_items_by_id.pop(item_id, None)
|
||||
item = self._items_by_id.pop(item_id)
|
||||
if item is not None:
|
||||
parent = self.invisibleRootItem()
|
||||
parent.removeRow(item.row())
|
||||
|
||||
def get_report_by_id(self, item_id):
|
||||
report_item = self._report_items_by_id.get(item_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue