fix group accessing

This commit is contained in:
Jakub Trllo 2022-07-12 17:48:55 +02:00
parent e58d83e530
commit 804bb9b338

View file

@ -98,6 +98,7 @@ class GroupWidget(QtWidgets.QWidget):
instances(list<CreatedInstance>): List of instances in
CreateContext.
"""
# Store instances by id and by subset name
instances_by_id = {}
instances_by_subset_name = collections.defaultdict(list)
@ -142,6 +143,7 @@ class GroupWidget(QtWidgets.QWidget):
class CardWidget(BaseClickableFrame):
"""Clickable card used as bigger button."""
selected = QtCore.Signal(str, str)
# Group identifier of card
# - this must be set because if send when mouse is released with card id
@ -178,6 +180,7 @@ class ContextCardWidget(CardWidget):
Is not visually under group widget and is always at the top of card view.
"""
def __init__(self, parent):
super(ContextCardWidget, self).__init__(parent)
@ -204,13 +207,14 @@ class ContextCardWidget(CardWidget):
class InstanceCardWidget(CardWidget):
"""Card widget representing instance."""
active_changed = QtCore.Signal()
def __init__(self, instance, group_icon, parent):
super(InstanceCardWidget, self).__init__(parent)
self._id = instance.id
self._group_identifier = instance.creator_label
self._group_identifier = instance.group_label
self._group_icon = group_icon
self.instance = instance