Fix bug when modifying node parameters
authorLaurent Bessard
Tue, 19 Jun 2012 20:28:05 +0200
changeset 2066 de4817ce8b50
parent 2065 71678bd14f43
child 2067 04cc0295e2c4
Fix bug when modifying node parameters
etherlab/etherlab.py
--- a/etherlab/etherlab.py	Mon Jun 11 02:37:23 2012 +0200
+++ b/etherlab/etherlab.py	Tue Jun 19 20:28:05 2012 +0200
@@ -122,6 +122,8 @@
             return params
         
     def SetParamsAttribute(self, path, value):
+        position = self.BaseParams.getIEC_Channel()
+        
         if path == "SlaveParams.Type":
             self.CTNParent.SetSlaveType(position, value)
             slave_type = self.CTNParent.GetSlaveType(self.GetSlavePos())
@@ -131,7 +133,6 @@
             self.CTNParent.SetSlaveAlias(position, value)
             return value, True
         
-        position = self.BaseParams.getIEC_Channel()
         value, changed = ConfigTreeNode.SetParamsAttribute(self, path, value)
         # Filter IEC_Channel, Slave_Type and Alias that have specific behavior
         if path == "BaseParams.IEC_Channel":