From: Vadim Zeitlin Date: Sun, 7 Oct 2007 21:48:09 +0000 (+0000) Subject: don't create m_dottedPen with an invalid 0 style which results in an assert under MSW X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f0eebb39bc6bb54441e695b3c1b1e0bea6ab5c01?ds=inline 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 --- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 800e58ad60..31c980e91f 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -850,7 +850,14 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent, if (!m_hasFont) 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);