1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00
This commit is contained in:
jules 2008-06-05 21:15:37 +00:00
parent 473753e9aa
commit 25e8d3f786

View file

@ -356,12 +356,14 @@ void positionToCode (const RelativePositionedRectangle& position,
positionToCode (ComponentTypeHandler::getComponentPosition (relCompY), layout, yrx, yry, yrw, yrh);
String wrx, wry, wrw, wrh;
Component* const relCompW = layout != 0 ? layout->findComponentWithId (position.relativeToW) : 0;
Component* const relCompW = (layout != 0 && position.rect.getWidthMode() != PositionedRectangle::absoluteSize)
? layout->findComponentWithId (position.relativeToW) : 0;
if (relCompW != 0)
positionToCode (ComponentTypeHandler::getComponentPosition (relCompW), layout, wrx, wry, wrw, wrh);
String hrx, hry, hrw, hrh;
Component* const relCompH = layout != 0 ? layout->findComponentWithId (position.relativeToH) : 0;
Component* const relCompH = (layout != 0 && position.rect.getHeightMode() != PositionedRectangle::absoluteSize)
? layout->findComponentWithId (position.relativeToH) : 0;
if (relCompH != 0)
positionToCode (ComponentTypeHandler::getComponentPosition (relCompH), layout, hrx, hry, hrw, hrh);