/[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 174 by bh, Wed May 15 13:30:00 2002 UTC revision 239 by bh, Wed Jul 24 17:15:54 2002 UTC
# Line 140  class ZoomInTool(RectTool): Line 140  class ZoomInTool(RectTool):
140  class ZoomOutTool(RectTool):  class ZoomOutTool(RectTool):
141    
142      """The Zoom-Out Tool"""      """The Zoom-Out Tool"""
143        
144      def Name(self):      def Name(self):
145          return "ZoomOutTool"          return "ZoomOutTool"
146    
# Line 151  class ZoomOutTool(RectTool): Line 151  class ZoomOutTool(RectTool):
151              cx, cy = self.current              cx, cy = self.current
152              if sx == cx and sy == cy:              if sx == cx and sy == cy:
153                  # Just a mouse click. Simply zoom out by a factor of two                  # Just a mouse click. Simply zoom out by a factor of two
154                  self.view.ZoomFactor(0.5, center = (cy, cy))                  self.view.ZoomFactor(0.5, center = (cx, cy))
155              else:              else:
156                  # A drag. Zoom out to the rectangle                  # A drag. Zoom out to the rectangle
157                  self.view.ZoomOutToRect((min(sx, cx), min(sy, cy),                  self.view.ZoomOutToRect((min(sx, cx), min(sy, cy),
# Line 598  class MapCanvas(wxWindow, Publisher): Line 598  class MapCanvas(wxWindow, Publisher):
598          # whether there is a selection at all doesn't change, when the          # whether there is a selection at all doesn't change, when the
599          # shape which is selected has changed (which means that layer or          # shape which is selected has changed (which means that layer or
600          # shapeid changes).          # shapeid changes).
         print "MapCanvas.shape_selected:", layer, shape  
601          if ((shape is not None or self.last_selected_shape is not None)          if ((shape is not None or self.last_selected_shape is not None)
602              and (shape != self.last_selected_shape              and (shape != self.last_selected_shape
603                   or layer != self.last_selected_layer)):                   or layer != self.last_selected_layer)):
             print "MapCanvas.shape_selected: redraw",  
604              self.full_redraw()              self.full_redraw()
605          else:  
606              print "MapCanvas.shape_selected: no redraw"          # remember the selection so we can compare when it changes again.
607          self.last_selected_layer = layer          self.last_selected_layer = layer
608          self.last_selected_shape = shape          self.last_selected_shape = shape
609    

Legend:
Removed from v.174  
changed lines
  Added in v.239

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26