fix the memory corruption in multiline controls due to wrong WrapLines() implementation [backport of rev 45343]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-05 21:37:36 +00:00
parent 6b0792e009
commit 056ae23eeb
2 changed files with 15 additions and 5 deletions

View File

@@ -234,9 +234,8 @@ public:
virtual bool Enable(bool enable = true);
// more readable flag testing methods
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
bool WrapLines() const
{ return !IsSingleLine() && !(GetWindowStyle() & wxHSCROLL); }
bool IsPassword() const { return HasFlag(wxTE_PASSWORD); }
bool WrapLines() const { return m_wrapLines; }
// only for wxStdTextCtrlInputHandler
void RefreshSelection();
@@ -500,7 +499,8 @@ private:
// flags
bool m_isModified:1,
m_isEditable:1,
m_hasCaret:1;
m_hasCaret:1,
m_wrapLines:1; // can't be changed after creation
// the rectangle (in client coordinates) to draw text inside
wxRect m_rectText;