forked from IPKM/nmreval
Sort option to context menu in data tree added; fixes T226
This commit is contained in:
@ -144,6 +144,9 @@ class UpperManagement(QtCore.QObject):
|
||||
def active_sets(self):
|
||||
return self.graphs.active(self.current_graph)
|
||||
|
||||
def get_attributes(self, graph_id: str, attr: str) -> dict[str, Any]:
|
||||
return {self.data[i].id: getattr(self.data[i], attr) for i in self.graphs[graph_id].sets}
|
||||
|
||||
def add(self, data, **kwargs):
|
||||
_id = str(uuid.uuid4())
|
||||
self.__setitem__(_id, data, **kwargs)
|
||||
@ -230,7 +233,7 @@ class UpperManagement(QtCore.QObject):
|
||||
self.graphs[self.data[key].graph].remove(key)
|
||||
|
||||
@QtCore.pyqtSlot(list, str, str)
|
||||
def move_sets(self, sets: list, dest: str, src, pos: int = -1):
|
||||
def move_sets(self, sets: list, dest: str, src: (str|list), pos: int = -1):
|
||||
if isinstance(src, str):
|
||||
src = [src]*len(sets)
|
||||
|
||||
|
Reference in New Issue
Block a user