(self, cfg, keys, ind=None)
| 395 | temp.insert(ind, value) |
| 396 | |
| 397 | def remove_key(self, cfg, keys, ind=None): |
| 398 | if not len(keys): # Avoid deleting a parent list or dict |
| 399 | return |
| 400 | temp = self.get_nested_key(cfg, keys) |
| 401 | try: |
| 402 | temp.pop(keys[-1]) |
| 403 | except TypeError: |
| 404 | if ind is None: |
| 405 | ind = self.tree.currentIndex().row() |
| 406 | temp.pop(ind) |
| 407 | return True |
| 408 | |
| 409 | def populate_tree(self, data, tree_widget): |
| 410 | if isinstance(data, dict): |