]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Added SetRoot in networkedit to change project root on the fly
authoretisserant <etisserant>
Tue, 11 Sep 2007 15:34:31 +0000 (15:34 +0000)
committeretisserant <etisserant>
Tue, 11 Sep 2007 15:34:31 +0000 (15:34 +0000)
objdictgen/nodelist.py

index c7000e7cfdb08e2215b501a211625a535e6faa23..6028e4d7426058c33b6afd53ff95fd37d44d3ac4 100644 (file)
@@ -62,6 +62,14 @@ class NodeList:
     
     def GetRoot(self):
         return self.Root
+
+    def SetRoot(self, newrootpath):
+        """
+        Define a new path for the CanOpen network project
+        !!! Does not check if new path is valid !!!
+        """
+        self.Root = newrootpath
+        self.Manager.SetCurrentFilePath(os.path.join(self.Root, "master.od"))
     
     def GetSlaveNumber(self):
         return len(self.SlaveNodes)