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

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

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

revision 824 by jonathan, Tue May 6 08:09:27 2003 UTC revision 831 by jonathan, Tue May 6 12:07:21 2003 UTC
# Line 277  class MapCanvas(wxWindow, Publisher): Line 277  class MapCanvas(wxWindow, Publisher):
277      delegated_methods = {"SelectLayer": "selection",      delegated_methods = {"SelectLayer": "selection",
278                           "SelectShapes": "selection",                           "SelectShapes": "selection",
279                           "SelectedLayer": "selection",                           "SelectedLayer": "selection",
280                           "HasSelectedLayer": "selection"}                           "HasSelectedLayer": "selection",
281                             "HasSelectedShapes": "selection"}
282    
283      def __init__(self, parent, winid):      def __init__(self, parent, winid):
284          wxWindow.__init__(self, parent, winid)          wxWindow.__init__(self, parent, winid)
# Line 528  class MapCanvas(wxWindow, Publisher): Line 529  class MapCanvas(wxWindow, Publisher):
529          if bbox is not None:          if bbox is not None:
530              proj = self.map.GetProjection()              proj = self.map.GetProjection()
531              if proj is not None:              if proj is not None:
532                    bbox = proj.ForwardBBox(bbox)
533    
534                if bbox is not None:
535                    self.FitRectToWindow(bbox)
536    
537        def FitSelectedToWindow(self):
538            layer = self.selection.SelectedLayer()
539            shapes = self.selection.SelectedShapes()
540    
541            bbox = layer.ShapesBoundingBox(shapes)
542            if bbox is not None:
543                proj = self.map.GetProjection()
544                if proj is not None:
545                  bbox = proj.ForwardBBox(bbox)                  bbox = proj.ForwardBBox(bbox)
546    
547              if bbox is not None:              if bbox is not None:

Legend:
Removed from v.824  
changed lines
  Added in v.831

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26