]> git.saurik.com Git - wxWidgets.git/commitdiff
don't create m_dottedPen with an invalid 0 style which results in an assert under MSW
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2007 21:48:09 +0000 (21:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2007 21:48:09 +0000 (21:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 800e58ad60f36bbc2f928a4de5a7d4c03efcdb43..31c980e91ff5ccfbb184887df36aacadd46faaa1 100644 (file)
@@ -850,7 +850,14 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
     if (!m_hasFont)
         SetOwnFont(attr.font);
 
     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);
 
 
     SetInitialSize(size);