]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/ogl/_basic.py
refresh widget after changing its colour
[wxWidgets.git] / wxPython / wx / lib / ogl / _basic.py
index 142ee3366af332fb2a3109413bfd7dea6a35ec28..91786506192788087a37950773aecc80cf061c8d 100644 (file)
@@ -814,7 +814,7 @@ class Shape(ShapeEvtHandler):
 
         for line in self._lines:
             if attachment == -1 or (line.GetTo() == self and line.GetAttachmentTo() == attachment or line.GetFrom() == self and line.GetAttachmentFrom() == attachment):
-                line.GetEventHandler().Draw(dc)
+                line.Draw(dc)
                 
         if recurse:
             for child in self._children:
@@ -1797,15 +1797,15 @@ class Shape(ShapeEvtHandler):
             dc.SetBrush(wx.BLACK_BRUSH)
 
         # Draw neck
-        dc.DrawLine(root, neck)
+        dc.DrawLine(root[0], root[1], neck[0], neck[1])
 
         if count > 1:
             # Draw shoulder-to-shoulder line
-            dc.DrawLine(shoulder1, shoulder2)
+            dc.DrawLine(shoulder1[0], shoulder1[1], shoulder2[0], shoulder2[1])
         # Draw all the little branches
         for i in range(count):
             pt, stemPt = self.GetBranchingAttachmentPoint(attachment, i)
-            dc.DrawLine(stemPt, pt)
+            dc.DrawLine(stemPt[0], stemPt[1], pt[0], pt[1])
 
             if self.GetBranchStyle() & BRANCHING_ATTACHMENT_BLOB and count > 1:
                 blobSize = 6.0
@@ -2227,7 +2227,7 @@ class Shape(ShapeEvtHandler):
             elif pt._type == CONTROL_POINT_VERTICAL:
                 newX1 = pt._controlPointDragStartX
                 newX2 = newX1 + pt._controlPointDragStartWidth
-            elif pt._type == CONTROL_POINT_DIAGONAL and (keys & KEYS or self.GetMaintainAspectRatio()):
+            elif pt._type == CONTROL_POINT_DIAGONAL and (keys & KEY_SHIFT or self.GetMaintainAspectRatio()):
                 newH = (newX2 - newX1) * (float(pt._controlPointDragStartHeight) / pt._controlPointDragStartWidth)
                 if pt.GetY() > pt._controlPointDragStartY:
                     newY2 = newY1 + newH