fix a fatal crash due to using wxHSCROLL presence in m_windowStyle as indicator of whether we wrap lines or not: this didn't work because wxHSCROLL was temporarily reset in wxWindow::Create() and so we used wxTextWrappedData when we only had created wxTextMultiLineData

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-08 23:25:36 +00:00
parent 2e9c0c010a
commit ccc20afae9
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;