Fixed bug when cancelling ActionBlockDialog
authorLaurent Bessard
Wed, 02 Oct 2013 17:58:16 +0200
changeset 1340 7e5702d1f246
parent 1339 6adf05c4508d
child 1341 0923e602c603
Fixed bug when cancelling ActionBlockDialog
dialogs/ActionBlockDialog.py
--- a/dialogs/ActionBlockDialog.py	Wed Oct 02 17:23:44 2013 +0200
+++ b/dialogs/ActionBlockDialog.py	Wed Oct 02 17:58:16 2013 +0200
@@ -205,13 +205,14 @@
 
     def SetValues(self, actions):
         for action in actions:
-            if action.type == "reference" and action.value in self.ActionList:
-                action.type = "Action"
-            elif action.type == "reference" and action.value in self.VariableList:
-                action.type = "Variable"
+            row = action.copy()
+            if row.type == "reference" and row.value in self.ActionList:
+                row.type = "Action"
+            elif row.type == "reference" and row.value in self.VariableList:
+                row.type = "Variable"
             else:
-                action.type = "Inline"
-        self.Table.SetData(actions)
+                row.type = "Inline"
+            self.Table.AppendRow(row)
         self.Table.ResetView(self.ActionsGrid)
         if len(actions) > 0:
             self.ActionsGrid.SetGridCursor(0, 0)