remove duplicates of keys in deletion; may help with #36

This commit is contained in:
Dominik Demuth
2023-04-08 17:16:05 +02:00
parent 0ec0021727
commit ffecc9c873
2 changed files with 12 additions and 3 deletions

View File

@ -291,8 +291,10 @@ class UpperManagement(QtCore.QObject):
if k in self.data:
cmd = DeleteCommand(self.data, k, self.newData, self.deleteData)
self.undostack.push(cmd)
else:
elif k in self.graphs:
rm_graphs.append(k)
else:
logger.warning(f'delete_sets: {k} is not in data or graph found')
for k in rm_graphs:
cmd = DeleteGraphCommand(self.graphs, k, self.restoreGraph, self.deleteGraph)