Fix BALMLayout archiving issues.

SharedSolver was archiving too many constraints, partly because of
multiple typos, also because it archived some which were just artifacts
of the layout process. These extra constraints are created when the
layout calls SetRange() on the left/top/right/bottom tabs during layout.

* LinearSpec/ActiveSetSolver had to be adjusted to get access to the
  constraints added by the SetRange() calls.
* BALM::TabBase was adjusted to avoid a segfault during unarchiving,
  caused by an unitialized member.
* ALMFriendLayoutTest was adjusted to include a more obvious custom
  constraint for testing.
This commit is contained in:
Alex Wilson
2012-05-03 08:45:44 +12:00
parent 5f4e71ba4c
commit c8b24e3eb5
8 changed files with 90 additions and 14 deletions
+7
View File
@@ -58,6 +58,10 @@ public:
virtual ResultType FindMins(const VariableList* variables) = 0;
virtual ResultType FindMaxs(const VariableList* variables) = 0;
virtual void GetRangeConstraints(const Variable* var,
const Constraint** _min,
const Constraint** _max) const = 0;
protected:
LinearSpec* fLinearSpec;
};
@@ -138,6 +142,9 @@ public:
BString ToString() const;
void GetRangeConstraints(const Variable*,
const Constraint** _min,
const Constraint** _max) const;
const ConstraintList& Constraints() const;
const VariableList& UsedVariables() const;
const VariableList& AllVariables() const;