forked from IPKM/nmreval
add merged set to graph of sources if source sets are in same graph (#185)
close #164 Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de> Reviewed-on: IPKM/nmreval#185
This commit is contained in:
parent
5b74ee1f29
commit
ce9bd5d2fd
@ -347,6 +347,7 @@ class UpperManagement(QtCore.QObject):
|
||||
group_set = set()
|
||||
name_set = set()
|
||||
value_set = set()
|
||||
graph_set = set()
|
||||
|
||||
if src_sets is None:
|
||||
if self.current_graph:
|
||||
@ -364,6 +365,7 @@ class UpperManagement(QtCore.QObject):
|
||||
name_set.add(data_i.name)
|
||||
group_set.add(data_i.group)
|
||||
value_set.add(data_i.value)
|
||||
graph_set.add(data_i.graph)
|
||||
|
||||
if joined is not None:
|
||||
joined.group = '+'.join(group_set)
|
||||
@ -374,7 +376,9 @@ class UpperManagement(QtCore.QObject):
|
||||
else:
|
||||
joined.value = 0.0
|
||||
|
||||
self.newData.emit([self.add(joined)], self.current_graph)
|
||||
dest_graph = graph_set.pop() if len(graph_set) == 1 else self.current_graph
|
||||
|
||||
self.newData.emit([self.add(joined)], dest_graph)
|
||||
|
||||
def get_data(self, sid: str, xy_only: bool = False):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user