Changeset 1110

Show
Ignore:
Timestamp:
12/14/06 14:23:42 (2 years ago)
Author:
arjanmol
Message:

bug fix in ForkNodeItem?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/branches/new-canvas/gaphor/diagram/activitynodes.py

    r1104 r1110  
    203203        Update join specification position. 
    204204        """ 
    205         self._join_spec_x, self._join_spec_y = get_text_point( 
    206                 text_extents(context.cairo, self.subject.joinSpec.value), 
    207                 self.width, self.height, 
    208                 (ALIGN_CENTER, ALIGN_TOP), 
    209                 (10, 0, 0, 0), 
    210                 True) 
     205        if isinstance(self.subject, UML.JoinNode): 
     206            self._join_spec_x, self._join_spec_y = get_text_point( 
     207                    text_extents(context.cairo, self.subject.joinSpec.value), 
     208                    self.width, self.height, 
     209                    (ALIGN_CENTER, ALIGN_TOP), 
     210                    (10, 0, 0, 0), 
     211                    True) 
    211212        super(ForkNodeItem, self).update(context) 
    212213 
     
    223224        cr.move_to(self.name_x, self.name_y) 
    224225 
    225         cr.move_to(self._join_spec_x, self._join_spec_y) 
    226         cr.show_text(self.subject.joinSpec.value) 
     226        if isinstance(self.subject, UML.JoinNode): 
     227            cr.move_to(self._join_spec_x, self._join_spec_y) 
     228            cr.show_text(self.subject.joinSpec.value) 
    227229 
    228230        cr.stroke()