From db4365c912197c49c0c8f7e9e12020041daf44b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20Ball=C3=BCder?= Date: Fri, 31 Jul 1998 08:41:17 +0000 Subject: [PATCH] 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 --- user/wxLayout/wxllist.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/user/wxLayout/wxllist.cpp b/user/wxLayout/wxllist.cpp index 214dba5232..9d8bd18060 100644 --- a/user/wxLayout/wxllist.cpp +++ b/user/wxLayout/wxllist.cpp @@ -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) {