Changeset 441
- Timestamp:
- Wed Jun 11 02:22:03 2008
- Files:
-
- ganttpv/trunk/ORM.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ganttpv/trunk/ORM.py
r438 r441 1961 1961 if self.dcid: 1962 1962 self.canvas.pdc.RemoveId(self.dcid) 1963 if self.dcid in self.canvas.objids: 1964 self.canvas.objids.remove(self.dcid) 1963 1965 self._SetInShell('dcid', None) 1966 self._SetInShell('canvas', None) 1964 1967 Data.Object.Delete(self) 1965 1968 … … 3054 3057 box_h = maxy - miny + 6 3055 3058 3056 pen = self.canvas.CachedPen( 1, 1, wx.SOLID)3059 pen = self.canvas.CachedPen(3, 1, wx.SOLID) 3056 3059 dc.SetPen(pen) 3057 3060 dc.DrawLine(enda[0], enda[1], endb[0], endb[1]) … … 3070 3073 draw_arrow.append((int(arrow.pop(0)+.5), int(arrow.pop(0)+.5)),) 3071 3074 if debug: print repr(draw_arrow) 3072 pen = self.canvas.CachedPen( 1, 1, wx.SOLID)3075 pen = self.canvas.CachedPen(3, 1, wx.SOLID) 3072 3075 dc.SetPen(pen) 3073 dc.SetBrush(self.canvas.CachedBrush(' Blue'))3076 dc.SetBrush(self.canvas.CachedBrush('Violet')) 3073 3076 dc.DrawPolygon(draw_arrow) # this works! 3074 3077 … … 4117 4120 4118 4121 def RedrawAll(self): # this should be called after undo and redo -- IMPORTANT 4119 for dcid in self.objids: 4120 shape = self.dcid_to_shape_xref.get(dcid) 4121 x, y = shape.PosX, shape.PosY # allow undo of moves (temp pos doesn't undo) 4122 if x != None and y != None: 4123 shape.SetTempPos(x, y) 4124 self.RedrawID(dcid) 4122 ## for dcid in self.objids: 4123 ## shape = self.dcid_to_shape_xref.get(dcid) 4124 # undelete objects will be in this list, but shouldn't be in self.objids 4125 for shape in self.Report.GetList('GraphicObject'): 4126 ## x, y = shape.PosX, shape.PosY # allow undo of moves (temp pos doesn't undo) 4127 ## if x != None and y != None: 4128 ## shape.SetTempPos(x, y) 4129 if shape.canvas == None: # they were deleted, the need to be recreated 4130 self.CreateNode(self.pdc, shape) 4131 shape.OnBottom() # put objectification behind facttype 4132 self.RedrawID(shape.dcid) 4125 4133 4126 4134 def _ConnectEm(self, source, target):
