From dda88f5eee7ae13a328f92996847f90caed2e5e9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 19 Dec 2000 13:52:57 +0000 Subject: [PATCH] fix for a crash in ~wxFontList git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/font/font.cpp | 6 ++---- src/gtk/font.cpp | 2 -- src/gtk1/font.cpp | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/samples/font/font.cpp b/samples/font/font.cpp index c436ed747d..7948599d42 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -451,7 +451,7 @@ void MyFrame::DoResizeFont(int diff) void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col) { - Resize(GetSize(), font); + Resize(GetClientSize(), font); m_canvas->SetTextFont(font); if ( col.Ok() ) @@ -610,9 +610,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSize(wxSizeEvent& event) { - wxSize size = event.GetSize(); - - Resize(size); + Resize(GetClientSize()); event.Skip(); } diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index c58aca2e81..a4e761d20c 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize, bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) { - Init(); - if( !fontname ) { *this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT); diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index c58aca2e81..a4e761d20c 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize, bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) { - Init(); - if( !fontname ) { *this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT); -- 2.45.2