diff options
author | Sebastian Geerken <devnull@localhost> | 2014-10-04 16:42:21 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-10-04 16:42:21 +0200 |
commit | 000ad0ab90444230f5bebc5c0a5b28f572e6a013 (patch) | |
tree | e23fec71f15bf0e4fa8d0d0892193c1cd96b148d | |
parent | 4276328eb92bcbefc1cca1df6e6c9b5be352f601 (diff) |
Fixed float clearance.
-rw-r--r-- | dw/outofflowmgr.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index 8789346d..a9e0acc3 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -2273,12 +2273,20 @@ int OutOfFlowMgr::getClearPosition (Textblock *tb, Side side) } else { Float *vloat = list->get(i); assert (vloat->generatingBlock != tb); - ensureFloatSize (vloat); - pos = vloat->yReal + vloat->size.ascent + vloat->size.descent - - getAllocation(tb)->y; - DBG_OBJ_MSGF ("resize.oofm", 1, "float %p => %d + (%d + %d) - %d", - vloat->getWidget (), vloat->yReal, vloat->size.ascent, - vloat->size.descent, getAllocation(tb)->y); + if (!wasAllocated (vloat->generatingBlock)) + pos = 0; // See above. + else { + ensureFloatSize (vloat); + pos = getAllocation(vloat->generatingBlock)->y + vloat->yReal + + vloat->size.ascent + vloat->size.descent + - getAllocation(tb)->y; + DBG_OBJ_MSGF ("resize.oofm", 1, + "float %p => %d + %d + (%d + %d) - %d", + vloat->getWidget (), + getAllocation(vloat->generatingBlock)->y, + vloat->yReal, vloat->size.ascent, vloat->size.descent, + getAllocation(tb)->y); + } } } |