Fixed bug with process variables grid
authorLaurent Bessard
Fri, 29 Mar 2013 01:13:17 +0100
changeset 2110 e8c43f542eb1
parent 2109 86832a0e113d
child 2111 f2cffda17d00
Fixed bug with process variables grid
etherlab/ConfigEditor.py
--- a/etherlab/ConfigEditor.py	Thu Mar 28 18:06:03 2013 +0900
+++ b/etherlab/ConfigEditor.py	Fri Mar 29 01:13:17 2013 +0100
@@ -761,9 +761,12 @@
             self.ProcessVariablesGrid.RefreshButtons()
     
     def SaveProcessVariables(self):
-        self.Controler.SetProcessVariables(
-            self.ProcessVariablesTable.GetData())
-        self.RefreshBuffer()
+        if self.CurrentNodesFilter is not None:
+            if len(self.CurrentNodesFilter) > 0:
+                self.Controler.SetProcessVariables(self.ProcessVariables)
+            else:
+                self.Controler.SetProcessVariables(self.ProcessVariablesTable.GetData())
+            self.RefreshBuffer()
     
     def RefreshStartupCommands(self, position=None, command_idx=None):
         if self.CurrentNodesFilter is not None:
@@ -794,6 +797,7 @@
     def OnNodesFilterChanged(self, event):
         self.RefreshCurrentNodesFilter()
         if self.CurrentNodesFilter is not None:
+            self.RefreshProcessVariables()
             self.RefreshStartupCommands()
             self.NodesVariables.RefreshView()
         event.Skip()