Changeset 1917

Show
Ignore:
Timestamp:
08/13/07 13:33:13 (1 year ago)
Author:
wrobe..@pld-linux.org
Message:

- added Solver.request_resolve_constraint method to allow requesting of

a constraint

- request min size constraint resolving after its LessThanConstraint?.delta

change

Files:

Legend:

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

    r1906 r1917  
    385385 
    386386        self._c_min_w.delta = min_width 
     387        if self.canvas: 
     388            self.canvas.solver.request_resolve_constraint(self._c_min_w) 
    387389 
    388390    min_width = reversible_property(lambda s: s._c_min_w.delta, _set_min_width) 
     
    397399 
    398400        self._c_min_h.delta = min_height 
     401        if self.canvas: 
     402            self.canvas.solver.request_resolve_constraint(self._c_min_h) 
    399403 
    400404    min_height = reversible_property(lambda s: s._c_min_h.delta, _set_min_height) 
  • gaphas/trunk/gaphas/solver.py

    r1882 r1917  
    485485 
    486486    reversible_pair(add_constraint, remove_constraint) 
     487 
     488 
     489    def request_resolve_constraint(self, c): 
     490        """ 
     491        Request resolving a constraint. 
     492        """ 
     493        self._marked_cons.append(c) 
     494 
    487495 
    488496    def constraints_with_variable(self, *variables):