mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-29 05:03:34 +08:00
gui/models/DictSyncTreeSepModel: add getitem
This commit is contained in:
parent
537fa2287b
commit
108aed569e
@ -331,6 +331,11 @@ class DictSyncTreeSepModel(QtCore.QAbstractItemModel):
|
||||
self._del_item(self, k.split(self.separator))
|
||||
del self.backing_store[k]
|
||||
|
||||
def __getitem__(self, k):
|
||||
def update():
|
||||
self[k] = self.backing_store[k]
|
||||
return _SyncSubstruct(update, self.backing_store[k])
|
||||
|
||||
def index_to_key(self, index):
|
||||
item = index.internalPointer()
|
||||
if item.children_by_row:
|
||||
|
Loading…
Reference in New Issue
Block a user