Commit e9d3a6e0 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update state function

parent 359f1ad8
......@@ -251,6 +251,8 @@ class sdlHandler(QObject):
state (variables of the SDL model): Create an undo action that
applies the change.
# Create a new global state
new_state = []
# Get the variables values from the asn1_value_editor window
for var, (sort, _) in self.proc.variables.viewitems():
#as_pyside = self.asn1_editor.getVariable(root=self.tree_items[var])
......@@ -262,6 +264,16 @@ class sdlHandler(QObject):
dest=asn1_instance, ASN1Swig=ASN1,
# Add the SDL state to the new global state, create a new hash, save it
new_hash = hash(frozenset(new_state))
self.set_of_states[new_hash] = new_state
# Apply the change and create Undo command to restore previous state
old_state = self.current_hash
undo_cmd = SendTC(self, old_state)
def on_event(self, tc_name=None, param=None):
''' Update the list of global states and GUI after a TC has been sent
Supports Markdown
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