234 |
save_session(self.session, self.session.filename) |
save_session(self.session, self.session.filename) |
235 |
|
|
236 |
def maps_changed(self, *args): |
def maps_changed(self, *args): |
237 |
|
"""Subscribed to the session's MAPS_CHANGED messages. |
238 |
|
|
239 |
|
Set the toplevel window's map to the map in the session. This is |
240 |
|
done by calling the window's SetMap method with the map as |
241 |
|
argument. If the session doesn't have any maps None is used |
242 |
|
instead. |
243 |
|
|
244 |
|
Currently Thuban can only really handle at most one map in a |
245 |
|
sessions so the first map in the session's list of maps as |
246 |
|
returned by the Maps method is used. |
247 |
|
""" |
248 |
if self.session.HasMaps(): |
if self.session.HasMaps(): |
249 |
self.top.SetMap(self.session.Maps()[0]) |
self.top.SetMap(self.session.Maps()[0]) |
250 |
else: |
else: |