]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/canvas.cpp
disable wxSocket for wxX11, doesn't link anyhow
[wxWidgets.git] / contrib / src / ogl / canvas.cpp
index 02bae38143268ddc909252ae2b63b72efe55bc7f..51ed0498e7610bd3f0e27ec695cd74e9d9c1d7cd 100644 (file)
@@ -14,7 +14,7 @@
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #pragma hdrstop
 
 #include <wx/wxexpr.h>
 
+#ifdef new
+#undef new
+#endif
+
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
 #else
@@ -57,8 +61,6 @@
 #define CONTROL_POINT_ENDPOINT_FROM 5
 #define CONTROL_POINT_LINE       6
 
-extern wxCursor *g_oglBullseyeCursor;
-
 IMPLEMENT_DYNAMIC_CLASS(wxShapeCanvas, wxScrolledWindow)
 
 BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow)
@@ -90,10 +92,11 @@ void wxShapeCanvas::OnPaint(wxPaintEvent& event)
 
     PrepareDC(dc);
 
+    dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
     dc.Clear();
 
-       if (GetDiagram())
-               GetDiagram()->Redraw(dc);
+    if (GetDiagram())
+        GetDiagram()->Redraw(dc);
 }
 
 void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event)