Changeset 2257

Show
Ignore:
Timestamp:
03/06/08 00:00:22 (9 months ago)
Author:
arj..@yirdis.nl
Message:

Fix #107 (undo problem when toggling Line.horizontal)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphas/trunk/gaphas/item.py

    r2256 r2257  
    1313from solver import solvable, WEAK, NORMAL, STRONG, VERY_STRONG 
    1414from constraint import EqualsConstraint, LessThanConstraint 
    15 from state import observed, reversible_pair, reversible_property, disable_dispatching 
     15from state import observed, reversible_method, reversible_pair, reversible_property, disable_dispatching 
    1616 
    1717 
     
    503503 
    504504    @observed 
     505    def _inner_set_horizontal(self, horizontal): 
     506        self._horizontal = horizontal 
     507 
     508    reversible_method(_inner_set_horizontal, _inner_set_horizontal, 
     509                      {'horizontal': lambda horizontal: not horizontal }) 
     510 
    505511    def _set_horizontal(self, horizontal): 
    506512        """ 
     
    512518        False 
    513519        """ 
    514         self._horizontal = horizontal 
     520        self._inner_set_horizontal(horizontal) 
    515521        self._set_orthogonal_constraints(self._orthogonal) 
    516522