]> git.saurik.com Git - wxWidgets.git/commitdiff
added a comment and hopefully improved extent detectionn
authorKarsten Ballüder <ballueder@usa.net>
Fri, 31 Jul 1998 08:41:17 +0000 (08:41 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Fri, 31 Jul 1998 08:41:17 +0000 (08:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

user/wxLayout/wxllist.cpp

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