X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f1ae4143271ae63a17e052a1a471d16e9cd8c44..fad535eea353fa1ce2f15e3053fc3b96e9a0b02d:/src/mac/stattext.cpp diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index 22653f651e..33e784261d 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/stattext.cpp @@ -15,6 +15,8 @@ #include "wx/app.h" #include "wx/stattext.h" +#include "wx/dc.h" +#include "wx/dcclient.h" #include @@ -55,6 +57,9 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, void wxStaticText::OnDraw( wxDC &dc ) { + if (m_width <= 0 || m_height <= 0) + return; + PrepareDC(dc); dc.Clear() ; @@ -254,7 +259,9 @@ void wxStaticText::SetLabel(const wxString& st ) m_label = st ; if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) SetSizeOrDefault() ; - - wxClientDC dc(this); - OnDraw( dc ) ; + + Refresh() ; + MacUpdateImmediately() ; +// wxClientDC dc(this); +// OnDraw( dc ) ; }