Permalink
Browse files

Fixed issue introducced by moving solve logic to constraints.

  • Loading branch information...
1 parent 469b414 commit 5344fb39667d07b61b9280219966b61a4eca57e7 @amolenaar committed Jun 28, 2012
Showing with 7 additions and 7 deletions.
  1. +3 −3 doc/undo.txt
  2. +2 −2 gaphas/constraint.py
  3. +2 −2 gaphas/item.py
View
@@ -282,14 +282,14 @@ An element has ``min_height`` and ``min_width`` properties.
>>> from gaphas import Element
>>> e = Element()
>>> e.min_height, e.min_width
- (10, 10)
+ (Variable(10, 100), Variable(10, 100))
>>> e.min_height, e.min_width = 30, 40
>>> e.min_height, e.min_width
- (30, 40)
+ (Variable(30, 100), Variable(40, 100))
>>> undo()
>>> e.min_height, e.min_width
- (10, 10)
+ (Variable(0, 100), Variable(0, 100))
>>> canvas = Canvas()
>>> canvas.add(e)
View
@@ -128,8 +128,8 @@ def solve(self):
solve_for() for that variable. The weakest variable is always in the set of variables
with the weakest strength. The least recently changed variable is considered the weakest.
"""
- wvar = c.weakest()
- c.solve_for(wvar)
+ wvar = self.weakest()
+ self.solve_for(wvar)
def solve_for(self, var):
"""
View
@@ -395,11 +395,11 @@ def _set_height(self, height):
20.0
>>> b.height = 2
>>> b.height
- 10.0
+ 2.0
>>> b._handles[NW].pos.y
Variable(0, 40)
>>> b._handles[SE].pos.y
- Variable(10, 40)
+ Variable(2, 40)
"""
h = self._handles
h[SE].pos.y = h[NW].pos.y + height

0 comments on commit 5344fb3

Please sign in to comment.