improve graph making while agr reading
This commit is contained in:
parent
17458f455b
commit
7290b62003
@ -216,10 +216,9 @@ class GraceEditor:
|
||||
def _make_graph(self, line: str):
|
||||
m = self._RE_GRAPH_START.match(line)
|
||||
g_idx = int(m.group(1))
|
||||
if g_idx < len(self.graphs):
|
||||
while g_idx < len(self.graphs):
|
||||
# this assumes that graphs are ordered in agr file even if missing, e.g. we read gß, g1, g3, ...
|
||||
while g_idx != len(self.graphs):
|
||||
self.graphs.append(GraceGraph(len(self.graphs)))
|
||||
self.graphs.append(GraceGraph(len(self.graphs)))
|
||||
|
||||
self.graphs.append(GraceGraph(g_idx))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user