Merged in from Mahogany. A bit better and safer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-05-18 15:05:29 +00:00
parent fac2987b2f
commit 974a5cccc1
5 changed files with 74 additions and 12 deletions

View File

@@ -598,6 +598,11 @@ wxLayoutLine::RecalculatePosition(wxLayoutList *llist)
void
wxLayoutLine::RecalculatePositions(int recurse, wxLayoutList *llist)
{
//FIXME: is this really needed? We run Layout() anyway.
// Recursing here, drives computation time up exponentially, as
// each line will cause all following lines to be recalculated.
return;
wxASSERT(recurse >= 0);
wxPoint pos = m_Position;
CoordType height = m_Height;
@@ -1243,7 +1248,8 @@ wxLayoutLine::Copy(wxLayoutList *llist,
CoordType firstOffset, lastOffset;
if(to == -1) to = GetLength();
if(from == to) return;
wxLOiterator first = FindObject(from, &firstOffset);
wxLOiterator last = FindObject(to, &lastOffset);
@@ -1562,6 +1568,7 @@ bool
wxLayoutList::Insert(wxLayoutObject *obj)
{
wxASSERT(m_CursorLine);
if(! m_CursorLine) m_CursorLine = GetFirstLine();
SetUpdateRect(m_CursorScreenPos);
SetUpdateRect(m_CursorScreenPos+m_CursorSize);
m_CursorLine->Insert(m_CursorPos.x, obj);