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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user