diff options
Diffstat (limited to 'dw')
-rw-r--r-- | dw/tools.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/dw/tools.cc b/dw/tools.cc index 65734900..df52ae1d 100644 --- a/dw/tools.cc +++ b/dw/tools.cc @@ -73,20 +73,21 @@ void SizeParams::forChild (Widget *parent, Widget *child, int xRel, int yRel, for (int i = 0; i < numChildReferences; i++) { Widget *childReference = child->sizeRequestReference (i); + if (childReference == parent) { - childParams->references[numPos] = childReference; - childParams->x[numPos] = xRel; - childParams->y[numPos] = yRel; - numPos++; + childParams->references[childParams->numPos] = childReference; + childParams->x[childParams->numPos] = xRel; + childParams->y[childParams->numPos] = yRel; + childParams->numPos++; } else { bool found = false; for (int j = 0; !found && j < numPos; j++) { if (childReference == references[j]) { found = true; - references[numPos] = childReference; - childParams->x[numPos] = x[j] + xRel; - childParams->y[numPos] = y[j] + yRel; - numPos++; + childParams->references[childParams->numPos] = childReference; + childParams->x[childParams->numPos] = x[j] + xRel; + childParams->y[childParams->numPos] = y[j] + yRel; + childParams->numPos++; } } } |