From ac5f6eb878e615789029fd5cd36fb9d65c78277c Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Sun, 3 Apr 2016 13:57:49 +0200 Subject: Replace OOFAwareWidget::borderChanged by OOFAwareWidget::updateReference. --- dw/ooffloatsmgr.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'dw/ooffloatsmgr.cc') diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index 5c704ee9..0f9a6faa 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -647,15 +647,22 @@ void OOFFloatsMgr::markSizeChange (int ref) vloat->dirty = true; DBG_OBJ_SET_BOOL_O (vloat->getWidget (), ".dirty", vloat->dirty); + assert (vloat->getWidget()->getWidgetReference() != NULL); + int first = findTBInfo (vloat->yReal); // The determination of the last element could perhaps be optimized, but we // do not yet know the *new* height of the float. int last = tbInfos->size () - 1; - for (int i = first; i <= last; i++) { - OOFAwareWidget *oofaw = tbInfos->get(i)->getOOFAwareWidget(); - DBG_OBJ_MSGF ("resize.oofm", 1, "calling borderChanged for %p", oofaw); - oofaw->borderChanged (oofmIndex, vloat->yReal, vloat->getWidget ()); - } + + DBG_OBJ_MSGF ("resize.oofm", 1, "updating from %d to %d", first, last); + + if (first <= last) + tbInfos->get(first)->getOOFAwareWidget() + ->updateReference (vloat->getWidget()->getWidgetReference() + ->parentRef); + + for (int i = first + 1; i <= last; i++) + tbInfos->get(first)->getOOFAwareWidget()->updateReference(0); DBG_OBJ_LEAVE (); } -- cgit v1.2.3