if shape.Selected():
shape.Select(False, dc)
- canvas.Redraw(dc)
+ #canvas.Redraw(dc)
+ canvas.Refresh(False)
else:
redraw = False
shapeList = canvas.GetDiagram().GetShapeList()
for s in toUnselect:
s.Select(False, dc)
- canvas.Redraw(dc)
+ ##canvas.Redraw(dc)
+ canvas.Refresh(False)
self.UpdateStatusBar(shape)
def OnMovePost(self, dc, x, y, oldX, oldY, display):
+ shape = self.GetShape()
ogl.ShapeEvtHandler.OnMovePost(self, dc, x, y, oldX, oldY, display)
- self.UpdateStatusBar(self.GetShape())
-
+ self.UpdateStatusBar(shape)
+ if "wxMac" in wx.PlatformInfo:
+ shape.GetCanvas().Refresh(False)
def OnRightClick(self, *dontcare):
self.log.WriteText("%s\n" % self.GetShape())
s.SetBitmap(bmp)
self.MyAddShape(s, 225, 130, None, None, "Bitmap")
- dc = wx.ClientDC(self)
- self.PrepareDC(dc)
+ #dc = wx.ClientDC(self)
+ #self.PrepareDC(dc)
for x in range(len(self.shapes)):
fromShape = self.shapes[x]
less likely to get rusty because nobody cares about the C++ lib any
more.
-<p>The Python version should be mostly drop-in compatible with the
-wrapped C++ version, except for the location of the package
-(wx.lib.ogl instead of wx.ogl) and that the base class methods are
-called the normal Python way (superclass.Method(self, ...)) instead of the
-hacky way that had to be done to support overloaded methods with the
-old SWIG (self.base_Method(...))
-
-
"""
if __name__ == '__main__':