/[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 1548 by bh, Fri Aug 1 16:13:49 2003 UTC revision 1549 by jan, Wed Aug 6 11:18:29 2003 UTC
# Line 2  Line 2 
2  # Authors:  # Authors:
3  # Jonathan Coles <[email protected]>  # Jonathan Coles <[email protected]>
4  # Frank Koormann <[email protected]>  # Frank Koormann <[email protected]>
5    # Jan-Oliver Wagner <[email protected]>
6  #  #
7  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
8  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
# Line 831  class UTMPanel(ProjPanel): Line 832  class UTMPanel(ProjPanel):
832          ProjPanel.Clear(self)          ProjPanel.Clear(self)
833    
834      def _OnPropose(self, event):      def _OnPropose(self, event):
835          UTMProposeZoneDialog          """Call the propose dialog.
836            If the receiver (e.g. the current map) has no bounding box,
837            inform the user accordingly.
838            """
839            bb = self.receiver.BoundingBox()
840            if bb is None:
841                dlg = wxMessageDialog(self,
842                        _("Can not propose: No bounding box found."),
843                        _("Projection: Propose UTM Zone"),
844                        wxOK | wxICON_INFORMATION)
845                dlg.CenterOnParent()
846                result = dlg.ShowModal()
847                dlg.Destroy()
848                return
849    
850          dlg = UTMProposeZoneDialog(self, self.receiver.BoundingBox())          dlg = UTMProposeZoneDialog(self, self.receiver.BoundingBox())
851          if dlg.ShowModal() == wxID_OK:          if dlg.ShowModal() == wxID_OK:
852              self.__zone.SetValue(dlg.GetProposedZone())              self.__zone.SetValue(dlg.GetProposedZone())
# Line 965  class UTMProposeZoneDialog(wxDialog): Line 980  class UTMProposeZoneDialog(wxDialog):
980          wxDialog.__init__(self, parent, -1, _("Projection: Propose UTM Zone"),          wxDialog.__init__(self, parent, -1, _("Projection: Propose UTM Zone"),
981                            wxDefaultPosition, wxSize(200, 100))                            wxDefaultPosition, wxSize(200, 100))
982          self.parent = parent          self.parent = parent
         #x, y, x2, y2 = elf.parent.parent.map_bounding_box  
983          x = x + 180          x = x + 180
984          x2 = x2 + 180          x2 = x2 + 180
985          center = (x2 - x) / 2 + x          center = (x2 - x) / 2 + x

Legend:
Removed from v.1548  
changed lines
  Added in v.1549

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26