From 448971f395cc928aea625448fdd74dcac5a6cb1c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 21 Jul 2004 22:53:43 +0000 Subject: [PATCH] If no colour name then use "BLACK" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/fontdlgg.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp index 1f3f5f056d..ac74a695a4 100644 --- a/src/generic/fontdlgg.cpp +++ b/src/generic/fontdlgg.cpp @@ -258,8 +258,11 @@ void wxGenericFontDialog::CreateWidgets() styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle())); weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight())); wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour())); - colourChoice->SetStringSelection(name); - + if (name.length()) + colourChoice->SetStringSelection(name); + else + colourChoice->SetStringSelection(wxT("BLACK")); + underLineCheckBox->SetValue(dialogFont.GetUnderlined()); pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1); -- 2.45.2