Changeset 350

Show
Ignore:
Timestamp:
Mon Oct 22 19:47:15 2007
Author:
Alexander
Message:

minor fix

Files:

Legend:

Unmodified
Added
Removed
Modified
  • scripts/trunk/ORM/Open ORM Window.py

    r349 r350  
    2753 2753     def Draw(self, dc):  
    2754 2754         orm_object = self.Get('Target')  
      2755         nary = max(orm_object.Nary, 2)  
    2755 2756         x, y = self.GetPos()  
    2756 2757 ##        x = self.PosX  # treat this as the center of the shape  
     
    2764 2765         # eventually allow any of 4 orientations (90 degree rotations)  
    2765 2766         if alignment == 0:  
    2766               w = (role_box_size) * (orm_object.Nary or 1)  
      2767             w = (role_box_size) * (nary)  
    2766 2767             h = role_box_size  
    2767 2768         box_w = w + 6  
     
    2772 2773         dc.SetPen(pen)  
    2773 2774         dc.SetBrush(self.canvas.CachedBrush('White'))  
    2774           for i in range(orm_object.Nary or 1):  
      2775         for i in range(nary):  
    2774 2775             dc.DrawRectangle(x+i*role_box_size,y,role_box_size+1,h)  
    2775 2776  
     
    2936 2937         nodeb = self.Get('NodeB')  
    2937 2938  
    2938           enda = self.GetFactEnd()  
      2939         enda = nodea.GetPos()  
    2938 2939         endb = nodeb.GetPos()  
    2939           endb = nodeb.AdjustEnd(enda)  
      2940         endb = nodea.AdjustEnd(endb), nodeb.AdjustEnd(enda)  
    2939 2940  
    2940 2941         dc.ClearId(self.dcid)