]> git.saurik.com Git - wxWidgets.git/commitdiff
For wxTextCtrl editor, set the bold font before margins are set up or it will not...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Jun 2010 10:31:24 +0000 (10:31 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Jun 2010 10:31:24 +0000 (10:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/editors.cpp
src/propgrid/propgrid.cpp

index 5867b53e1eee7671d9aaf0c4cef2ba032206c95e..ed0c11a48f597bc0ffe20c81e04ac22dbadfd602 100644 (file)
@@ -1919,6 +1919,13 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos,
     }
 #endif
 
+    // This code is repeated from DoSelectProperty(). However, font boldness
+    // must be set before margin is set up below in FixPosForTextCtrl().
+    if ( forColumn == 1 &&
+         prop->HasFlag(wxPG_PROP_MODIFIED) &&
+         HasFlag(wxPG_BOLD_MODIFIED) )
+         tc->SetFont( m_captionFont );
+
     // Center the control vertically
     if ( !hasSpecialSize )
         FixPosForTextCtrl(tc, forColumn);
index f734d40507c940274c776eea6c171b99833650e8..6af958bbc4f504802acb2359ae0a0b83a74396ad 100644 (file)
@@ -1635,8 +1635,8 @@ bool wxPropertyGrid::EnsureVisible( wxPGPropArg id )
 // Control font changer helper.
 void wxPropertyGrid::SetCurControlBoldFont()
 {
-    wxASSERT( m_wndEditor );
-    m_wndEditor->SetFont( m_captionFont );
+    wxWindow* editor = GetEditorControl();
+    editor->SetFont( m_captionFont );
 }
 
 // -----------------------------------------------------------------------