added a comment and hopefully improved extent detectionn

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder 1998-07-31 08:41:17 +00:00
parent 4f08af68b9
commit db4365c912

View File

@ -397,6 +397,8 @@ wxLayoutList::Draw(wxDC &dc, bool findObject, wxPoint const &findCoords)
// calculate next object's position: // calculate next object's position:
position.x += size.x; position.x += size.x;
if(position.x > m_MaxX)
m_MaxX = position.x;
// do we need to increase the line's height? // do we need to increase the line's height?
if(size.y > baseLineSkip) if(size.y > baseLineSkip)
@ -440,8 +442,6 @@ wxLayoutList::Draw(wxDC &dc, bool findObject, wxPoint const &findCoords)
draw = false; draw = false;
} }
if(position.x+size.x > m_MaxX)
m_MaxX = position.x+size.x;
// is it a linebreak? // is it a linebreak?
if(type == WXLO_TYPE_LINEBREAK || i == tail()) if(type == WXLO_TYPE_LINEBREAK || i == tail())
{ {
@ -504,6 +504,9 @@ wxLayoutList::Debug(void)
/******************** editing stuff ********************/ /******************** editing stuff ********************/
// don't change this, I know how to optimise this and will do it real
// soon (KB)
wxLayoutObjectList::iterator wxLayoutObjectList::iterator
wxLayoutList::FindObjectCursor(wxPoint const &cpos, CoordType *offset) wxLayoutList::FindObjectCursor(wxPoint const &cpos, CoordType *offset)
{ {