aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/ooffloatsmgr.cc19
-rw-r--r--dw/ooffloatsmgr.hh4
2 files changed, 18 insertions, 5 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index 1dfdecf7..2b7642dc 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -559,8 +559,13 @@ void OOFFloatsMgr::sizeAllocateStart (OOFAwareWidget *caller,
caller, allocation->x, allocation->y, allocation->width,
allocation->ascent, allocation->descent);
- getOOFAwareWidget(caller)->allocation = *allocation;
- getOOFAwareWidget(caller)->wasAllocated = true;
+ // Some callers are not registered, especially tables. (Where the
+ // floats manager is actually empty?)
+ TBInfo *oofAWInfo = getOOFAwareWidgetPerhaps (caller);
+ if (oofAWInfo) {
+ oofAWInfo->allocation = *allocation;
+ oofAWInfo->wasAllocated = true;
+ }
if (caller == container) {
// In the size allocation process, the *first* OOFM method
@@ -1891,10 +1896,16 @@ bool OOFFloatsMgr::getFloatDiffToCB (Float *vloat, int *leftDiff,
return result;
}
-OOFFloatsMgr::TBInfo *OOFFloatsMgr::getOOFAwareWidget (OOFAwareWidget *widget)
+OOFFloatsMgr::TBInfo *OOFFloatsMgr::getOOFAwareWidgetPerhaps (OOFAwareWidget
+ *widget)
{
TypedPointer<OOFAwareWidget> key (widget);
- TBInfo *tbInfo = tbInfosByOOFAwareWidget->get (&key);
+ return tbInfosByOOFAwareWidget->get (&key);
+}
+
+OOFFloatsMgr::TBInfo *OOFFloatsMgr::getOOFAwareWidget (OOFAwareWidget *widget)
+{
+ TBInfo *tbInfo = getOOFAwareWidgetPerhaps (widget);
assert (tbInfo);
return tbInfo;
}
diff --git a/dw/ooffloatsmgr.hh b/dw/ooffloatsmgr.hh
index 8f5cdd1f..1846366a 100644
--- a/dw/ooffloatsmgr.hh
+++ b/dw/ooffloatsmgr.hh
@@ -216,7 +216,8 @@ private:
return allocation->ascent + allocation->descent; }
void updateAllocation ();
- inline OOFAwareWidget *getOOFAwareWidget () { return (OOFAwareWidget*)getWidget (); }
+ inline OOFAwareWidget *getOOFAwareWidget ()
+ { return (OOFAwareWidget*)getWidget (); }
};
// These two lists store all floats, in the order in which they are
@@ -300,6 +301,7 @@ private:
bool getFloatDiffToCB (Float *vloat, int *leftDiff, int *rightDiff);
TBInfo *getOOFAwareWidget (OOFAwareWidget *textblock);
+ TBInfo *getOOFAwareWidgetPerhaps (OOFAwareWidget *textblock);
int getBorder (OOFAwareWidget *textblock, Side side, int y, int h,
OOFAwareWidget *lastGB, int lastExtIndex);
SortedFloatsVector *getFloatsListForOOFAwareWidget (OOFAwareWidget