Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit a73fc855 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[gui-lib] Fix bug during the deletion of a transition

parent 40e42366
...@@ -1920,12 +1920,20 @@ class CTransition(object): ...@@ -1920,12 +1920,20 @@ class CTransition(object):
""" """
remove the transition from its macro node remove the transition from its macro node
""" """
lgtr = self.macro_node.transitions # list<list<CTransitions>> Sublists: transitions with common extremities
for gtr in self.macro_node.transitions: # defaultdict(<type 'list'>, {frozenset(['A', 'D']): [D -> A, C:, E:],
if self in gtr: temp_transitions = self.macro_node.new_transitions
gtr.remove(self) for nodes, transitions in self.macro_node.new_transitions.items():
if len(gtr) == 0: if self in transitions:
lgtr.remove(gtr) if len(transitions) == 1:
temp_transitions.pop(nodes)
continue
# Multiple transitions: remove only the current one
# Is it really happen?
print("Remove only the current transition")
transitions.remove(self)
self.macro_node.new_transitions = temp_transitions
self.ori.outgoing_trans.remove(self) self.ori.outgoing_trans.remove(self)
self.ext.incoming_trans.remove(self) self.ext.incoming_trans.remove(self)
self.ori.model.transition_list.remove(self) self.ori.model.transition_list.remove(self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment