Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14192
Modified Files:
layoutEditor.py
Log Message:
Another hack for Mac - can get drag events without a preceding
mouseDown event, when re-focusing into this window to immediately drag a
resizing handle (the mousedown is swallowed by system to trigger focus into the
window).
Index: layoutEditor.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/layoutEditor.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** layoutEditor.py 13 Jan 2006 07:28:59 -0000 1.1
--- layoutEditor.py 26 May 2006 11:38:51 -0000 1.2
***************
*** 1021,1024 ****
--- 1021,1034 ----
# AGT 2005-05-17 Removed obsolete Windows variant
globalPosition = wx.GetMousePosition()
+ # AGT 2006-05-26 another hack for Mac - can get drag events without a preceding
+ # mouseDown event, when re-focusing into this window to immediately drag a
+ # resizing handle
+ if not self.resizingHandleTarget:
+ self.resizingHandleTarget = event.target.name
+ self.hideSizingHandles()
+ self.startPosition = self.components[self.startName].position
+ self.startSize = self.components[self.startName].size
+ self.offset = event.target.ScreenToClient(globalPosition)
+
x, y = self.components[self.resizingHandleTarget].ScreenToClient(globalPosition)
xOffset = x - self.offset[0]
|