]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/stattext.cpp
corrected redraw problems with native controls
[wxWidgets.git] / src / mac / stattext.cpp
index 22653f651e02c6b0370599febc420f63e240260c..5ce406a67a892724b25819345ffd63ab2fc85a34 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/app.h"
 #include "wx/stattext.h"
+#include "wx/dc.h"
+#include "wx/dcclient.h"
 
 #include <stdio.h>
 
@@ -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() ;