don't create m_dottedPen with an invalid 0 style which results in an assert under MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-07 21:48:09 +00:00
parent 26f119eb25
commit f0eebb39bc

View File

@@ -850,7 +850,14 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
if (!m_hasFont) if (!m_hasFont)
SetOwnFont(attr.font); SetOwnFont(attr.font);
m_dottedPen = wxPen( wxT("grey"), 0, 0 ); // this is a misnomer: it's called "dotted pen" but uses (default) wxSOLID
// style because we apparently get performance problems when using dotted
// pen for drawing in some ports -- but under MSW it seems to work fine
#ifdef __WXMSW__
m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxDOT);
#else
m_dottedPen = *wxGREY_PEN;
#endif
SetInitialSize(size); SetInitialSize(size);