Changeset 2266
- Timestamp:
- 03/07/08 06:20:56 (9 months ago)
- Files:
-
- gaphas/trunk/gaphas/item.py (modified) (4 diffs)
- gaphas/trunk/gaphas/tests/test_line.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphas/trunk/gaphas/item.py
r2258 r2266 542 542 """ 543 543 super(Line, self).setup_canvas() 544 self. orthogonal = self.orthogonal544 self._update_orthogonal_constraints(self.orthogonal) 545 545 546 546 def teardown_canvas(self): … … 609 609 do_split(segment, parts) 610 610 # Force orthogonal constraints to be recreated 611 self. orthogonal = self.orthogonal611 self._update_orthogonal_constraints(self.orthogonal) 612 612 return self._handles[segment+1:segment+parts] 613 613 … … 653 653 else: 654 654 # Force orthogonal constraints to be recreated 655 self. orthogonal = self.orthogonal655 self._update_orthogonal_constraints(self.orthogonal) 656 656 return deleted_handles 657 657 … … 755 755 __test__ = { 756 756 'Line._set_orthogonal': Line._set_orthogonal, 757 'Line._set_horizontal': Line._set_horizontal,758 'Line.split_segment': Line.split_segment,759 'Line.merge_segment': Line.merge_segment,760 757 } 761 758 gaphas/trunk/gaphas/tests/test_line.py
r2265 r2266 84 84 assert canvas.solver._constraints == after_ortho 85 85 86 line.split_segment(0) 87 88 assert len(canvas.solver._constraints) == 3 89 assert len(line.handles()) == 4 90 after_split = set(canvas.solver._constraints) 91 92 del undo_list[:] 93 94 line.merge_segment(0) 95 96 assert len(canvas.solver._constraints) == 2 97 assert len(line.handles()) == 3 98 99 undo() 100 101 assert len(canvas.solver._constraints) == 3 102 assert len(line.handles()) == 4 103 assert canvas.solver._constraints == after_split 104 86 105 87 106 # vim:sw=4:et
