/[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 1651 by bh, Wed Aug 6 17:21:32 2003 UTC revision 1652 by bh, Mon Aug 25 15:59:58 2003 UTC
# Line 305  class MapCanvas(wxWindow, ViewPort): Line 305  class MapCanvas(wxWindow, ViewPort):
305              self.dragging = 1              self.dragging = 1
306    
307      def OnLeftUp(self, event):      def OnLeftUp(self, event):
308          self.MouseLeftUp(event)          """Handle EVT_LEFT_UP
309    
310            Release the mouse if it was captured, if a tool is active call
311            its Hide method and call self.MouseLeftUp.
312            """
313            # It's important that ReleaseMouse is called before MouseLeftUp.
314            # MouseLeftUp may pop up modal dialogs which leads to an
315            # effectively frozen X session because the user can only
316            # interact with the dialog but the mouse is still grabbed by the
317            # canvas.
318          if self.dragging:          if self.dragging:
319              self.ReleaseMouse()              if self.HasCapture():
320                    self.ReleaseMouse()
321              try:              try:
322                  self.tool.Hide(self.drag_dc)                  self.tool.Hide(self.drag_dc)
323              finally:              finally:
324                  self.drag_dc = None                  self.drag_dc = None
325                  self.dragging = 0                  self.dragging = 0
326            self.MouseLeftUp(event)
327    
328      def OnMotion(self, event):      def OnMotion(self, event):
329          if self.dragging:          if self.dragging:

Legend:
Removed from v.1651  
changed lines
  Added in v.1652

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26