377 |
|
|
378 |
def SaveSessionAs(self): |
def SaveSessionAs(self): |
379 |
dlg = wxFileDialog(self, _("Save Session As"), ".", "", |
dlg = wxFileDialog(self, _("Save Session As"), ".", "", |
380 |
"*.thuban", wxOPEN) |
"*.thuban", wxSAVE|wxOVERWRITE_PROMPT) |
381 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wxID_OK: |
382 |
self.application.session.SetFilename(dlg.GetPath()) |
self.application.session.SetFilename(dlg.GetPath()) |
383 |
self.application.SaveSession() |
self.application.SaveSession() |
401 |
def SetMap(self, map): |
def SetMap(self, map): |
402 |
self.canvas.SetMap(map) |
self.canvas.SetMap(map) |
403 |
self.__SetTitle(map.Title()) |
self.__SetTitle(map.Title()) |
404 |
#self.legendPanel.SetMap(map) |
|
405 |
|
dialog = self.FindRegisteredDock("legend") |
406 |
|
if dialog is not None: |
407 |
|
dialog.GetPanel().SetMap(self.Map()) |
408 |
|
|
409 |
def Map(self): |
def Map(self): |
410 |
"""Return the map displayed by this mainwindow""" |
"""Return the map displayed by this mainwindow""" |
411 |
|
|
|
# sanity check |
|
|
#assert(self.canvas.Map() is self.legendPanel.GetMap()) |
|
|
|
|
412 |
return self.canvas.Map() |
return self.canvas.Map() |
413 |
|
|
414 |
def ToggleSessionTree(self): |
def ToggleSessionTree(self): |