fix for a crash in ~wxFontList
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -451,7 +451,7 @@ void MyFrame::DoResizeFont(int diff)
|
|||||||
|
|
||||||
void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col)
|
void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col)
|
||||||
{
|
{
|
||||||
Resize(GetSize(), font);
|
Resize(GetClientSize(), font);
|
||||||
|
|
||||||
m_canvas->SetTextFont(font);
|
m_canvas->SetTextFont(font);
|
||||||
if ( col.Ok() )
|
if ( col.Ok() )
|
||||||
@@ -610,9 +610,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::OnSize(wxSizeEvent& event)
|
void MyFrame::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
wxSize size = event.GetSize();
|
Resize(GetClientSize());
|
||||||
|
|
||||||
Resize(size);
|
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
@@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize,
|
|||||||
|
|
||||||
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
|
|
||||||
if( !fontname )
|
if( !fontname )
|
||||||
{
|
{
|
||||||
*this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT);
|
*this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT);
|
||||||
|
@@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize,
|
|||||||
|
|
||||||
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
|
|
||||||
if( !fontname )
|
if( !fontname )
|
||||||
{
|
{
|
||||||
*this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT);
|
*this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT);
|
||||||
|
Reference in New Issue
Block a user