Browse Source

reload the spec if it's a module, to pick up saved changes from previous edit sessions

Darren Ranalli 22 years ago
parent
commit
249563eef1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/level/LevelSpec.py

+ 3 - 0
direct/src/level/LevelSpec.py

@@ -19,6 +19,9 @@ class LevelSpec:
         If not passed in, will create a new spec."""
         newSpec = 0
         if type(spec) is types.ModuleType:
+            if __debug__:
+                # reload the spec module to pick up changes
+                reload(spec)
             self.specDict = spec.levelSpec
             if __debug__:
                 self.setFilename(spec.__file__)