Skip to content

Commit

Permalink
Fixed|UI|Client: Updating widget margins
Browse files Browse the repository at this point in the history
The sums were not correctly updated when margins were changed.
  • Loading branch information
skyjake committed Jan 3, 2014
1 parent 5c141b5 commit 70283fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doomsday/client/src/ui/framework/margins.cpp
Expand Up @@ -89,18 +89,19 @@ DENG2_PIMPL(Margins)
{
if(!outputs[side]) return;

// Update the sums.
if(side == LeftRight || side == SideLeft || side == SideRight)
{
if(inputs[SideLeft] && inputs[SideRight])
if(outputs[LeftRight] && inputs[SideLeft] && inputs[SideRight])
{
outputs[side]->setSource(*inputs[SideLeft] + *inputs[SideRight]);
outputs[LeftRight]->setSource(*inputs[SideLeft] + *inputs[SideRight]);
}
}
else if(side == TopBottom || side == SideTop || side == SideBottom)
{
if(inputs[SideTop] && inputs[SideBottom])
if(outputs[TopBottom] && inputs[SideTop] && inputs[SideBottom])
{
outputs[side]->setSource(*inputs[SideTop] + *inputs[SideBottom]);
outputs[TopBottom]->setSource(*inputs[SideTop] + *inputs[SideBottom]);
}
}

Expand Down

0 comments on commit 70283fb

Please sign in to comment.