From 5733bbb94ba66890b5e9e1853346dc5c8b507779 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Thu, 16 Sep 2010 22:02:17 +0000 Subject: [PATCH] If the constraints are infeasible don't move the windows because the target positions are not valid. Partially fix #6631. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38680 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/decorators/SATDecorator/SATWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/add-ons/decorators/SATDecorator/SATWindow.cpp b/src/add-ons/decorators/SATDecorator/SATWindow.cpp index d16dff4713..b17b899acc 100644 --- a/src/add-ons/decorators/SATDecorator/SATWindow.cpp +++ b/src/add-ons/decorators/SATDecorator/SATWindow.cpp @@ -94,7 +94,9 @@ GroupCookie::DoGroupLayout(SATWindow* triggerWindow) ResultType result; for (int32 tries = 0; tries < 15; tries++) { result = fSATGroup->GetLinearSpec()->Solve(); - if (result == OPTIMAL || result == INFEASIBLE) { + if (result == INFEASIBLE) + break; + if (result == OPTIMAL) { fSATGroup->AdjustWindows(triggerWindow); break; }