From: Karsten Ballüder Date: Fri, 14 May 1999 11:36:17 +0000 (+0000) Subject: a few more buglets X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ed07b20b506d54a9dfcc177c22f7224c3e09ebec a few more buglets git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/user/wxLayout/TODO b/user/wxLayout/TODO index 428859cd9e..36c27bcfce 100644 --- a/user/wxLayout/TODO +++ b/user/wxLayout/TODO @@ -17,8 +17,13 @@ TODO ===================================================================== Inserting NL in empty line sometimes doesn't move cursor down. +Line numbers go a bit berserk, too. :-) + +The following two probs can probably be fixed by adding the +RecalculateLayout() method: + Funny re-layout shows again in sample text. + Printing works again, but layout at begin of new page is corrupted. -Printing produces empty pages only. Selections: - moving in negative direction doesn't work diff --git a/user/wxLayout/wxLayout.cpp b/user/wxLayout/wxLayout.cpp index 3fbeea93ac..4266562924 100644 --- a/user/wxLayout/wxLayout.cpp +++ b/user/wxLayout/wxLayout.cpp @@ -116,14 +116,12 @@ MyFrame::MyFrame(void) : void MyFrame::AddSampleText(wxLayoutList *llist) { -#if 0 llist->Clear(wxSWISS,16,wxNORMAL,wxNORMAL, false); llist->SetFont(-1,-1,-1,-1,-1,"blue"); llist->Insert("blue"); llist->SetFont(-1,-1,-1,-1,-1,"black"); llist->Insert("The quick brown fox jumps over the lazy dog."); llist->LineBreak(); -#endif llist->SetFont(wxROMAN,16,wxNORMAL,wxNORMAL, false); llist->Insert("--"); @@ -152,7 +150,6 @@ MyFrame::AddSampleText(wxLayoutList *llist) llist->SetFont(-1,-1,wxNORMAL); llist->LineBreak(); -#if 0 llist->Insert("and "); llist->SetFont(-1,-1,wxSLANT); llist->Insert("slanted"); @@ -197,7 +194,6 @@ MyFrame::AddSampleText(wxLayoutList *llist) llist->LineBreak(); } } -#endif llist->MoveCursorTo(wxPoint(0,0)); m_lwin->SetDirty(); m_lwin->Refresh(); diff --git a/user/wxLayout/wxllist.cpp b/user/wxLayout/wxllist.cpp index f6c86e10e0..a56aad668d 100644 --- a/user/wxLayout/wxllist.cpp +++ b/user/wxLayout/wxllist.cpp @@ -1410,6 +1410,7 @@ wxLayoutList::LineBreak(void) m_FirstLine = m_CursorLine->GetPreviousLine(); m_CursorPos.y++; m_CursorPos.x = 0; +// doesn't help m_CursorLine.MarkDirty(); m_CursorLine->RecalculatePositions(true, this); //FIXME needed? return true; } diff --git a/user/wxLayout/wxllist.h b/user/wxLayout/wxllist.h index 52c87053db..a9cf311850 100644 --- a/user/wxLayout/wxllist.h +++ b/user/wxLayout/wxllist.h @@ -606,6 +606,8 @@ public: /// Returns dirty state bool IsDirty(void) const { return m_Dirty; } + /// Marks line as diry. + void MarkDirty(void) { m_Dirty = true; } private: /// Destructor is private. Use DeleteLine() to remove it. ~wxLayoutLine();