FIX: wxGDIFont exception when init

Change-Id: Ib245e89e2e8644c662d7621101777a5d8e15c7d9
This commit is contained in:
liz.li 2023-01-03 11:37:54 +08:00 committed by Lane.Wei
parent a163d4fa02
commit 5f5ffc8376
1 changed files with 1 additions and 6 deletions

View File

@ -584,12 +584,7 @@ bool GLTexture::generate_texture_from_text(const std::string& text_str, wxFont&
// draw message
memDC.SetTextForeground(*wxWHITE);
wxGCDC dc2(memDC);
dc2.SetFont(font);
dc2.SetBackground(wxBrush(background));
dc2.SetTextForeground(*wxWHITE);
dc2.DrawLabel(msg, wxRect(0, 0, m_width, m_height), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
memDC.DrawLabel(msg, wxRect(0, 0, m_width, m_height), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
memDC.SelectObject(wxNullBitmap);