diff options
author | Sebastian Geerken <devnull@localhost> | 2016-04-03 20:04:43 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-04-03 20:04:43 +0200 |
commit | e4d40bd507a65d76732efd351c48e286b1446db8 (patch) | |
tree | 194251b4a0409954c95a7334f3c4657adfcdf4de /dw/ooffloatsmgr.cc | |
parent | f20d99f012cf66369f8d896c4915a5444d8e04fe (diff) |
Fix usage of OOFAwareWidget::updateReference.
Diffstat (limited to 'dw/ooffloatsmgr.cc')
-rw-r--r-- | dw/ooffloatsmgr.cc | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index 0f9a6faa..fe6d25d4 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -649,19 +649,14 @@ void OOFFloatsMgr::markSizeChange (int ref) 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; - - 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++) + int first = getOOFAwareWidget(vloat->generator)->index; + DBG_OBJ_MSGF ("resize.oofm", 1, "updating from %d", first); + + tbInfos->get(first)->getOOFAwareWidget() + ->updateReference (vloat->getWidget()->getWidgetReference() + ->parentRef); + + for (int i = first + 1; i < tbInfos->size(); i++) tbInfos->get(first)->getOOFAwareWidget()->updateReference(0); DBG_OBJ_LEAVE (); |