/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/projdialog.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/projdialog.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1058 by frank, Tue May 27 11:30:29 2003 UTC revision 1135 by frank, Thu Jun 5 15:05:21 2003 UTC
# Line 100  class ProjFrame(NonModalNonParentDialog) Line 100  class ProjFrame(NonModalNonParentDialog)
100    
101          self.__set_properties()          self.__set_properties()
102          self.__do_layout()          self.__do_layout()
103    
104          # wxGlade          # wxGlade
105    
106            # Fill the projection choice list.
107            for proj, name, clazz in self.projPanels:
108                self.projchoice.Append(name, [clazz, None])
109    
110          self.originalProjection = self.receiver.GetProjection()          self.originalProjection = self.receiver.GetProjection()
111    
112          self.__DoOnProjAvail()          self.__DoOnProjAvail()
# Line 180  class ProjFrame(NonModalNonParentDialog) Line 185  class ProjFrame(NonModalNonParentDialog)
185                  self.__ShowError(projfile.GetFilename(), errstr)                  self.__ShowError(projfile.GetFilename(), errstr)
186              self.availprojs.SetClientData(sel[0], [newproj, projfile])              self.availprojs.SetClientData(sel[0], [newproj, projfile])
187    
188                self.__FillAvailList( selectProj = newproj.GetName())
189    
190      def _OnAddToList(self, event):      def _OnAddToList(self, event):
191    
192          proj = self.__GetProjection()          proj = self.__GetProjection()
# Line 190  class ProjFrame(NonModalNonParentDialog) Line 197  class ProjFrame(NonModalNonParentDialog)
197              except IOError, (errno, errstr):              except IOError, (errno, errstr):
198                  self.__ShowError(self.__userProjFile.GetFilename(), errstr)                  self.__ShowError(self.__userProjFile.GetFilename(), errstr)
199    
200              self.__FillAvailList()              self.__FillAvailList( selectProj = proj.GetName())
201    
202      def _OnProjAvail(self, event):      def _OnProjAvail(self, event):
203          self.__DoOnProjAvail()          self.__DoOnProjAvail()
# Line 469  class ProjFrame(NonModalNonParentDialog) Line 476  class ProjFrame(NonModalNonParentDialog)
476    
477          return None          return None
478    
479      def __FillAvailList(self, selectCurrent = False):      def __FillAvailList(self, selectCurrent = False, selectProj = None):
480          """Populate the list of available projections.          """Populate the list of available projections.
481                    
482          selectCurrent -- if True, select the projection used by          selectCurrent -- if True, select the projection used by
483                           the receiver, otherwise select nothing.                           the receiver, otherwise select nothing.
484            selectProj    -- if set, select the projection found under the
485                             specified name. This overwrites any other
486                             selection estimate.
487          """          """
488    
489          self.availprojs.Clear()          self.availprojs.Clear()
# Line 496  class ProjFrame(NonModalNonParentDialog) Line 506  class ProjFrame(NonModalNonParentDialog)
506              self.availprojs.Append(proj.GetName(), [proj, projfile])              self.availprojs.Append(proj.GetName(), [proj, projfile])
507          self.__usrProjFile = projfile          self.__usrProjFile = projfile
508    
         for proj, name, clazz in self.projPanels:  
             self.projchoice.Append(name, [clazz, None])  
   
509          #          #
510          # We add the current projection to the list at last.          # We add the current projection to the list at last.
511          # Since the list is resorted immediately a following FindString()          # Since the list is resorted immediately a following FindString()
# Line 517  class ProjFrame(NonModalNonParentDialog) Line 524  class ProjFrame(NonModalNonParentDialog)
524                  self.availprojs.SetSelection(                  self.availprojs.SetSelection(
525                          self.availprojs.FindString("<None>")                          self.availprojs.FindString("<None>")
526                      )                      )
527            if selectProj:
528                self.availprojs.SetSelection(
529                            self.availprojs.FindString(selectProj)
530                        )
531    
532                                    
533    
534      def __set_properties(self):      def __set_properties(self):
# Line 843  class LCCPanel(ProjPanel): Line 855  class LCCPanel(ProjPanel):
855          sizer.Add(wxStaticText(self, -1,          sizer.Add(wxStaticText(self, -1,
856              _("Latitude of second standard parallel:")))              _("Latitude of second standard parallel:")))
857          sizer.Add(self.__sspLatitude, 0, wxALL, 4)          sizer.Add(self.__sspLatitude, 0, wxALL, 4)
         sizer.Add(wxStaticText(self, -1, _("Latitude of origin:")))  
         sizer.Add(self.__originLat, 0, wxALL, 4)  
858          sizer.Add(wxStaticText(self, -1, _("Central Meridian:")))          sizer.Add(wxStaticText(self, -1, _("Central Meridian:")))
859          sizer.Add(self.__meridian, 0, wxALL, 4)          sizer.Add(self.__meridian, 0, wxALL, 4)
860            sizer.Add(wxStaticText(self, -1, _("Latitude of origin:")))
861            sizer.Add(self.__originLat, 0, wxALL, 4)
862          sizer.Add(wxStaticText(self, -1, _("False Easting:")))          sizer.Add(wxStaticText(self, -1, _("False Easting:")))
863          sizer.Add(self.__falseEast, 0, wxALL, 4)          sizer.Add(self.__falseEast, 0, wxALL, 4)
864          sizer.Add(wxStaticText(self, -1, _("False Northing:")))          sizer.Add(wxStaticText(self, -1, _("False Northing:")))

Legend:
Removed from v.1058  
changed lines
  Added in v.1135

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26