73 |
self.originalProjection = self.receiver.GetProjection() |
self.originalProjection = self.receiver.GetProjection() |
74 |
|
|
75 |
self.projection_list.SelectProjection(self.originalProjection) |
self.projection_list.SelectProjection(self.originalProjection) |
|
self.button_ok.SetFocus() |
|
76 |
self.projection_list.SetFocus() |
self.projection_list.SetFocus() |
77 |
|
|
78 |
def build_dialog(self): |
def build_dialog(self): |
208 |
def OnClose(self, event): |
def OnClose(self, event): |
209 |
self.projection_list.Unsubscribe(PROJ_SELECTION_CHANGED, |
self.projection_list.Unsubscribe(PROJ_SELECTION_CHANGED, |
210 |
self.proj_selection_changed) |
self.proj_selection_changed) |
211 |
|
# Destroy the projection list explicitly so that it properly |
212 |
|
# unsubscribes everything. It would be cleaner if the projection |
213 |
|
# could do this by itself but wx doesn't always send destroy |
214 |
|
# events for non-top-level widgets |
215 |
|
self.projection_list.Destroy() |
216 |
NonModalNonParentDialog.OnClose(self, event) |
NonModalNonParentDialog.OnClose(self, event) |
217 |
|
|
218 |
def OnApply(self, event): |
def OnApply(self, event): |
463 |
self.projchoice.Select(0) |
self.projchoice.Select(0) |
464 |
self.projchoice.Disable() |
self.projchoice.Disable() |
465 |
self._show_proj_panel(UnknownProjPanel) |
self._show_proj_panel(UnknownProjPanel) |
466 |
|
assert self.curProjPanel is not None |
467 |
|
self.curProjPanel.SetProjection(proj) |
468 |
else: |
else: |
469 |
self.projfilepath.SetLabel(_("Multiple Projections selected")) |
self.projfilepath.SetLabel(_("Multiple Projections selected")) |
470 |
|
|
657 |
def __init__(self, parent, receiver): |
def __init__(self, parent, receiver): |
658 |
ProjPanel.__init__(self, parent) |
ProjPanel.__init__(self, parent) |
659 |
|
|
660 |
|
self.__text = _("Thuban does not know the parameters\n" |
661 |
|
"for the current projection and cannot\n" |
662 |
|
"display a configuration panel.\n\n" |
663 |
|
"The unidentified set of parameters is:\n\n") |
664 |
|
|
665 |
|
self.__textbox = wxTextCtrl(self, -1, self.__text, size=(100,200), |
666 |
|
style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP) |
667 |
self._DoLayout() |
self._DoLayout() |
668 |
|
|
669 |
def _DoLayout(self): |
def _DoLayout(self): |
670 |
sizer = wxBoxSizer(wxVERTICAL) |
sizer = wxBoxSizer(wxVERTICAL) |
671 |
|
|
672 |
sizer.Add(wxStaticText(self, -1, |
sizer.Add(self.__textbox, 0, wxALL|wxEXPAND, 4) |
|
_("Thuban does not know the parameters\n" |
|
|
"for the current projection and cannot\n" |
|
|
"display a configuration panel."))) |
|
673 |
|
|
674 |
ProjPanel._DoLayout(self, sizer) |
ProjPanel._DoLayout(self, sizer) |
675 |
|
|
677 |
return "Unknown" |
return "Unknown" |
678 |
|
|
679 |
def SetProjection(self, proj): |
def SetProjection(self, proj): |
680 |
pass |
"""Append the available parameters to the info text.""" |
681 |
|
text = self.__text |
682 |
|
for param in proj.GetAllParameters(): |
683 |
|
text = text + '%s\n' % param |
684 |
|
self.__textbox.SetValue(text) |
685 |
|
|
686 |
def GetParameters(self): |
def GetParameters(self): |
687 |
return None |
return None |