85 |
|
|
86 |
def UnsetModified(self): |
def UnsetModified(self): |
87 |
"""Unset the modified flag of the session and the maps""" |
"""Unset the modified flag of the session and the maps""" |
|
print "Session.UnsetModified: entry", self.modified |
|
88 |
Modifiable.UnsetModified(self) |
Modifiable.UnsetModified(self) |
89 |
for map in self.maps: |
for map in self.maps: |
90 |
map.UnsetModified() |
map.UnsetModified() |
|
print "Session.UnsetModified: exit", self.modified |
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
def create_empty_session(): |
def create_empty_session(): |
95 |
"""Return an empty session useful as a starting point""" |
"""Return an empty session useful as a starting point""" |
96 |
|
import os |
97 |
session = Session('unnamed session') |
session = Session('unnamed session') |
98 |
session.SetFilename('unnamed.session') |
session.SetFilename(None) |
99 |
session.AddMap(Map('unnamed map')) |
session.AddMap(Map('unnamed map')) |
100 |
|
session.UnsetModified() |
101 |
return session |
return session |