Skip to content

Commit

Permalink
Fixed|libappfw|Margins: Updating margins
Browse files Browse the repository at this point in the history
The sum of the left and right margins wasn't always updated properly.
  • Loading branch information
skyjake committed Feb 2, 2014
1 parent 47c69e2 commit 294bced
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doomsday/libappfw/src/margins.cpp
Expand Up @@ -89,7 +89,10 @@ DENG2_PIMPL(Margins)

void updateOutput(int side)
{
if(!outputs[side]) return;
if(side < 4 && outputs[side] && inputs[side])
{
outputs[side]->setSource(*inputs[side]);
}

// Update the sums.
if(side == LeftRight || side == SideLeft || side == SideRight)
Expand All @@ -106,11 +109,6 @@ DENG2_PIMPL(Margins)
outputs[TopBottom]->setSource(*inputs[SideTop] + *inputs[SideBottom]);
}
}

if(side < 4 && inputs[side])
{
outputs[side]->setSource(*inputs[side]);
}
}

Rule const &getOutput(int side)
Expand Down

0 comments on commit 294bced

Please sign in to comment.