X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..cb0afb266214f827417c42474168c7edda7c953e:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index c567806c24..9efd84b6e8 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -97,9 +97,7 @@ bool wxTextCtrl::Create( , const wxPoint& rPos , const wxSize& rSize , long lStyle -#if wxUSE_VALIDATORS , const wxValidator& rValidator -#endif , const wxString& rsName ) { @@ -114,9 +112,7 @@ bool wxTextCtrl::Create( ,rPos ,rSize ,lStyle -#if wxUSE_VALIDATORS ,rValidator -#endif ,rsName )) return FALSE; @@ -511,6 +507,15 @@ void wxTextCtrl::SetInsertionPointEnd() { long lPos = GetLastPosition(); + // + // We must not do anything if the caret is already there because calling + // SetInsertionPoint() thaws the controls if Freeze() had been called even + // if it doesn't actually move the caret anywhere and so the simple fact of + // doing it results in horrible flicker when appending big amounts of text + // to the control in a few chunks (see DoAddText() test in the text sample) + // + if (GetInsertionPoint() == GetLastPosition()) + return; SetInsertionPoint(lPos); } // end of wxTextCtrl::SetInsertionPointEnd @@ -705,6 +710,11 @@ bool wxTextCtrl::IsModified() const return bRc; } // end of wxTextCtrl::IsModified +void wxTextCtrl::MarkDirty() +{ + wxFAIL_MSG( _T("not implemented") ); +} + // // Makes 'unmodified' // @@ -1175,9 +1185,11 @@ void wxTextCtrl::AdjustSpaceLimit() bool wxTextCtrl::AcceptsFocus() const { // - // We don't want focus if we can't be edited + // We don't want focus if we can't be edited unless we're a multiline + // control because then it might be still nice to get focus from keyboard + // to be able to scroll it without mouse // - return IsEditable() && wxControl::AcceptsFocus(); + return (IsEditable() || IsMultiLine()) && wxControl::AcceptsFocus(); } // end of wxTextCtrl::Command wxSize wxTextCtrl::DoGetBestSize() const